diff options
| author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:12 +0000 |
|---|---|---|
| committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:12 +0000 |
| commit | f8aff52e25d3464d2a21ef0527f30e5a7d6fab9b (patch) | |
| tree | 8a18a33b4e810cdec7bd6dee59821dc09c867aa0 /src/ircd.c | |
| parent | 3f01210bf188e3b7ef334df51b2443e0d94a1b6d (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/ircd.c')
| -rw-r--r-- | src/ircd.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/ircd.c b/src/ircd.c index c2ba87303..a09a19ea9 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -63,7 +63,6 @@ void initIrcdProto() ircdproto.ircd_cmd_242 = NULL; ircdproto.ircd_cmd_243 = NULL; ircdproto.ircd_cmd_211 = NULL; - ircdproto.ircd_cmd_global = NULL; ircdproto.ircd_cmd_sqline = NULL; ircdproto.ircd_cmd_squit = NULL; ircdproto.ircd_cmd_svso = NULL; @@ -458,15 +457,14 @@ void anope_cmd_211(const char *fmt, ...) void anope_cmd_global(const char *source, const char *fmt, ...) { - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - } - ircdproto.ircd_cmd_global(source, buf); + va_list args; + char buf[BUFSIZE] = ""; + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + ircdprotonew->cmd_global(source, buf); } void anope_cmd_sqline(const char *mask, const char *reason) @@ -714,11 +712,6 @@ void pmodule_cmd_211(void (*func) (const char *buf)) ircdproto.ircd_cmd_211 = func; } -void pmodule_cmd_global(void (*func) (const char *source, const char *buf)) -{ - ircdproto.ircd_cmd_global = func; -} - void pmodule_cmd_sqline(void (*func) (const char *mask, const char *reason)) { ircdproto.ircd_cmd_sqline = func; |
