diff options
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; |