diff options
Diffstat (limited to 'src/ircd.c')
-rw-r--r-- | src/ircd.c | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/src/ircd.c b/src/ircd.c index ce4840301..30a3d6b17 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -254,32 +254,27 @@ void anope_cmd_notice2(char *source, char *dest, char *msg) ircdproto.ircd_cmd_notice2(source, dest, msg); } -void anope_cmd_action(char *source, char *dest, const char *fmt, ...)
-{
- va_list args;
- char buf[BUFSIZE];
- char actionbuf[BUFSIZE];
-
- *buf = '\0';
- *actionbuf = '\0';
-
- if (fmt) {
- va_start(args, fmt);
- vsnprintf(buf, BUFSIZE - 1, fmt, args);
- va_end(args);
- } else {
- return;
- }
-
- if (!buf) {
- return;
- }
- snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1);
- ircdproto.ircd_cmd_privmsg(source, dest, actionbuf);
-}
- - -void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...) +void anope_cmd_action(char *source, char *dest, const char *fmt, ...)
+{ +
va_list args; +
char buf[BUFSIZE]; +
char actionbuf[BUFSIZE]; +
*buf = '\0'; +
*actionbuf = '\0'; +
if (fmt) { +
va_start(args, fmt); +
vsnprintf(buf, BUFSIZE - 1, fmt, args); +
va_end(args); +
} else { +
return; +
} +
if (!buf) { +
return; +
} +
snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1); +
ircdproto.ircd_cmd_privmsg(source, dest, actionbuf); +
} +
void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...) { va_list args; char buf[BUFSIZE]; |