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 | 3f01210bf188e3b7ef334df51b2443e0d94a1b6d (patch) | |
| tree | e59ca1bfa22b8e9fa58e934207332530a967449e /src/ircd.c | |
| parent | d1004fe1a46c9f14555ee3b9832c00a696cde0fe (diff) | |
Added cmd_part() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1241 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/ircd.c')
| -rw-r--r-- | src/ircd.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/ircd.c b/src/ircd.c index 348d1ba61..c2ba87303 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_part = NULL; ircdproto.ircd_cmd_391 = NULL; ircdproto.ircd_cmd_250 = NULL; ircdproto.ircd_cmd_307 = NULL; @@ -322,17 +321,15 @@ void anope_cmd_invite(const char *source, const char *chan, const char *nick) void anope_cmd_part(const char *nick, const char *chan, const char *fmt, ...) { - if (fmt) { - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - ircdproto.ircd_cmd_part(nick, chan, buf); - } else { - ircdproto.ircd_cmd_part(nick, chan, NULL); - } + if (fmt) { + va_list args; + char buf[BUFSIZE] = ""; + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + ircdprotonew->cmd_part(nick, chan, buf); + } + else ircdprotonew->cmd_part(nick, chan, NULL); } void anope_cmd_391(const char *source, const char *timestr) @@ -657,11 +654,6 @@ void pmodule_cmd_351(void (*func) (const char *source)) ircdproto.ircd_cmd_351 = func; } -void pmodule_cmd_part(void (*func) (const char *nick, const char *chan, const char *buf)) -{ - ircdproto.ircd_cmd_part = func; -} - void pmodule_cmd_391(void (*func) (const char *source, const char *timestr)) { ircdproto.ircd_cmd_391 = func; |
