summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/extern.h2
-rw-r--r--include/services.h18
2 files changed, 15 insertions, 5 deletions
diff --git a/include/extern.h b/include/extern.h
index 96ea8d52a..1b6e930ab 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1110,8 +1110,6 @@ E int db_mysql_load_news(void);
E unsigned int mysql_rand(void);
#endif
-E void notice(char *source, const char *dest, const char *fmt, ...);
-
/******************************************************************************/
E void anope_cmd_capab(); /* CAPAB */
diff --git a/include/services.h b/include/services.h
index 6a23d4162..4b9af9c48 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1239,7 +1239,11 @@ class IRCDProto {
if (NSDefFlags & NI_MSG)
SendPrivmsgInternal(bi, dest, buf);
else
- SendNotice(bi, dest, buf);
+ SendNoticeInternal(bi, dest, buf);
+ }
+ virtual void SendNoticeInternal(BotInfo *bi, const char *dest, const char *msg)
+ {
+ send_cmd(UseTS6 ? bi->uid : bi->nick, "NOTICE %s :%s", dest, msg);
}
virtual void SendPrivmsgInternal(BotInfo *bi, const char *dest, const char *buf)
{
@@ -1310,9 +1314,17 @@ class IRCDProto {
BotInfo *bi = findbot(source);
SendMessageInternal(bi, dest, buf);
}
- virtual void SendNotice(BotInfo *bi, const char *dest, const char *msg)
+ virtual void SendNotice(const char *source, const char *dest, const char *fmt, ...)
{
- send_cmd(UseTS6 ? bi->uid : bi->nick, "NOTICE %s :%s", dest, msg);
+ va_list args;
+ char buf[BUFSIZE] = "";
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ BotInfo *bi = findbot(source);
+ SendNoticeInternal(bi, dest, buf);
}
virtual void SendPrivmsg(const char *source, const char *dest, const char *fmt, ...)
{