diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:11 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:11 +0000 |
commit | 82722cf5d7d56a51830f797b5396908387107b64 (patch) | |
tree | b05b3223893de9bfa10e2bf38b17907652a05aaa /src/ircd.c | |
parent | 44f01ce8d5e604f5539f55d393ec9df17d14ffd7 (diff) |
Added cmd_quit() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1236 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 a812164ea..206f24544 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -51,7 +51,6 @@ void initIrcdProto() ircdproto.ircd_cmd_375 = NULL; ircdproto.ircd_cmd_376 = NULL; ircdproto.ircd_cmd_351 = NULL; - ircdproto.ircd_cmd_quit = NULL; ircdproto.ircd_cmd_pong = NULL; ircdproto.ircd_cmd_join = NULL; ircdproto.ircd_cmd_unsqline = NULL; @@ -295,15 +294,14 @@ void anope_cmd_351(const char *source) void anope_cmd_quit(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_quit(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_quit(source, buf); } void anope_cmd_pong(const char *servname, const char *who) @@ -663,11 +661,6 @@ void pmodule_cmd_351(void (*func) (const char *source)) ircdproto.ircd_cmd_351 = func; } -void pmodule_cmd_quit(void (*func) (const char *source, const char *buf)) -{ - ircdproto.ircd_cmd_quit = func; -} - void pmodule_cmd_pong(void (*func) (const char *servname, const char *who)) { ircdproto.ircd_cmd_pong = func; |