summaryrefslogtreecommitdiff
path: root/src/protocol/ratbox.c
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:12 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:12 +0000
commitf8aff52e25d3464d2a21ef0527f30e5a7d6fab9b (patch)
tree8a18a33b4e810cdec7bd6dee59821dc09c867aa0 /src/protocol/ratbox.c
parent3f01210bf188e3b7ef334df51b2443e0d94a1b6d (diff)
Added cmd_global() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1242 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/ratbox.c')
-rw-r--r--src/protocol/ratbox.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 57ede49e3..98aa5bbdd 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -462,24 +462,17 @@ void RatboxProto::cmd_privmsg(const char *source, const char *dest, const char *
send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "PRIVMSG %s :%s", UseTS6 ? (ud2 ? ud2->uid : dest) : dest, buf);
}
-void ratbox_cmd_global(const char *source, const char *buf)
+void RatboxProto::cmd_global(const char *source, const char *buf)
{
- Uid *u;
-
- if (!buf) {
- return;
- }
-
- if (source) {
- u = find_uid(source);
- if (u) {
- send_cmd((UseTS6 ? u->uid : source), "OPERWALL :%s", buf);
- } else {
- send_cmd((UseTS6 ? TS6SID : ServerName), "OPERWALL :%s", buf);
- }
- } else {
- send_cmd((UseTS6 ? TS6SID : ServerName), "OPERWALL :%s", buf);
- }
+ if (!buf) return;
+ if (source) {
+ Uid *u = find_uid(source);
+ if (u) {
+ send_cmd(UseTS6 ? u->uid : source, "OPERWALL :%s", buf);
+ return;
+ }
+ }
+ send_cmd(UseTS6 ? TS6SID : ServerName, "OPERWALL :%s", buf);
}
int anope_event_sjoin(const char *source, int ac, const char **av)
@@ -1615,7 +1608,6 @@ void moduleAddAnopeCmds()
pmodule_cmd_242(ratbox_cmd_242);
pmodule_cmd_243(ratbox_cmd_243);
pmodule_cmd_211(ratbox_cmd_211);
- pmodule_cmd_global(ratbox_cmd_global);
pmodule_cmd_sqline(ratbox_cmd_sqline);
pmodule_cmd_squit(ratbox_cmd_squit);
pmodule_cmd_svso(ratbox_cmd_svso);