diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/extern.h | 1 | ||||
| -rw-r--r-- | include/services.h | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/extern.h b/include/extern.h index 1b6e930ab..a53b4f603 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1130,7 +1130,6 @@ E void anope_SendGlobalNotice(const char *source, const char *dest, const char * E void anope_SendPart(const char *nick, const char *chan, const char *fmt, ...); /* PART */ E void anope_cmd_pass(const char *pass); /* PASS */ E void anope_SendPong(const char *servname, const char *who); /* PONG */ -E void anope_cmd_action(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */ E void anope_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg); /* PRIVMSG */ E void anope_cmd_protoctl(); /* PROTOCTL */ E void anope_SendQuit(const char *source, const char *fmt, ...); /* QUIT */ diff --git a/include/services.h b/include/services.h index 4b9af9c48..9be7c6ad4 100644 --- a/include/services.h +++ b/include/services.h @@ -1326,6 +1326,21 @@ class IRCDProto { BotInfo *bi = findbot(source); SendNoticeInternal(bi, dest, buf); } + virtual void SendAction(const char *source, const char *dest, const char *fmt, ...) + { + va_list args; + char buf[BUFSIZE] = "", actionbuf[BUFSIZE] = ""; + 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); + BotInfo *bi = findbot(source); + SendPrivmsgInternal(bi, dest, actionbuf); + } virtual void SendPrivmsg(const char *source, const char *dest, const char *fmt, ...) { va_list args; |
