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:12 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:12 +0000
commita587cdc9987b0b8f4c86caa70f1bca741a69145d (patch)
treea3701adf69225092c0023c813e7f15b2b96d9971 /src/ircd.c
parent34afc576d7b3f43cf099b8cb28e86a4740bf41f1 (diff)
Added cmd_ctcp() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1263 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 52893c8f6..de304e485 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -71,7 +71,6 @@ void initIrcdProto()
ircdproto.ircd_cmd_jupe = NULL;
ircdproto.ircd_valid_nick = NULL;
ircdproto.ircd_valid_chan = NULL;
- ircdproto.ircd_cmd_ctcp = NULL;
}
/* Special function, returns 1 if executed, 0 if not */
@@ -586,15 +585,14 @@ int anope_valid_chan(const char *chan)
void anope_cmd_ctcp(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_ctcp(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_ctcp(source, dest, buf);
}
@@ -693,11 +691,6 @@ void pmodule_cmd_211(void (*func) (const char *buf))
ircdproto.ircd_cmd_211 = func;
}
-void pmodule_cmd_ctcp(void (*func) (const char *source, const char *dest, const char *buf))
-{
- ircdproto.ircd_cmd_ctcp = func;
-}
-
void pmodule_cmd_svsjoin(void (*func)
(const char *source, const char *nick, const char *chan,
const char *param))