mirror of
https://github.com/anope/anope.git
synced 2026-07-05 22:53:13 +02:00
Replaced notice() with direct call to SendMessage() in IRCDProto class.
Added SendNoticeInternal() function to IRCDProto class, now SendNotice() is a stub to handle varargs. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1336 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -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 */
|
||||
|
||||
+15
-3
@@ -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, ...)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user