summaryrefslogtreecommitdiff
path: root/src/ircd.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:11 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:11 +0000
commit00466f884cca8975972d0802999288da2c0b9fdf (patch)
treebc6a5351dc09820330d6b3429b654bf9377f06b7 /src/ircd.c
parent7a167d97af6ef7e97c05488ae37c8f482173adb9 (diff)
Added cmd_mode() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1218 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/ircd.c')
-rw-r--r--src/ircd.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/ircd.c b/src/ircd.c
index 25336fb5d..be80b742f 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -50,7 +50,6 @@ void initIrcdProto()
ircdproto.ircd_cmd_372_error = NULL;
ircdproto.ircd_cmd_375 = NULL;
ircdproto.ircd_cmd_376 = NULL;
- ircdproto.ircd_cmd_mode = NULL;
ircdproto.ircd_cmd_bot_nick = NULL;
ircdproto.ircd_cmd_kick = NULL;
ircdproto.ircd_cmd_notice_ops = NULL;
@@ -200,15 +199,14 @@ void anope_cmd_guest_nick(const char *nick, const char *user, const char *host,
void anope_cmd_mode(const char *source, const char *dest, 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_mode(source, dest, buf);
+ va_list args;
+ char buf[BUFSIZE] = "";
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ ircdprotonew->cmd_mode(source, dest, buf);
}
void anope_cmd_bot_nick(const char *nick, const char *user, const char *host, const char *real, const char *modes)
@@ -700,11 +698,6 @@ void pmodule_cmd_376(void (*func) (const char *source))
ircdproto.ircd_cmd_376 = func;
}
-void pmodule_cmd_mode(void (*func) (const char *source, const char *dest, const char *buf))
-{
- ircdproto.ircd_cmd_mode = func;
-}
-
void pmodule_cmd_bot_nick(void (*func)
(const char *nick, const char *user, const char *host, const char *real,
const char *modes))