mirror of
https://github.com/anope/anope.git
synced 2026-07-01 22:46:39 +02:00
Replaced anope_SendNoticeChanops() with direct call to SendNoticeChanops() in IRCDProto class.
Also added SendNoticeChanopsInternal() function to IRCDProto class, now SendNoticeChanops() is a stub to handle varargs. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1332 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -1130,7 +1130,6 @@ E void anope_SendBotOp(const char *nick, const char *chan); /* MODE BotS
|
||||
E void anope_cmd_netinfo(int ac, const char **av); /* NETINFO */
|
||||
E void anope_SendChangeBotNick(const char *oldnick, const char *newnick); /* NICK */
|
||||
E void anope_cmd_message(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
|
||||
E void anope_SendNoticeChanops(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
|
||||
E void anope_cmd_notice(const char *source, const char *dest, const char *msg); /* NOTICE */
|
||||
E void anope_SendGlobalNotice(const char *source, const char *dest, const char *msg); /* NOTICE */
|
||||
E void anope_SendPart(const char *nick, const char *chan, const char *fmt, ...); /* PART */
|
||||
|
||||
+12
-1
@@ -1233,6 +1233,7 @@ class IRCDProto {
|
||||
virtual void SendSVSKillInternal(const char *, const char *, const char *) = 0;
|
||||
virtual void SendModeInternal(const char *, const char *, const char *) = 0;
|
||||
virtual void SendKickInternal(const char *, const char *, const char *, const char *) = 0;
|
||||
virtual void SendNoticeChanopsInternal(const char *, const char *, const char *) = 0;
|
||||
public:
|
||||
virtual void SendSVSNOOP(const char *, int) { }
|
||||
virtual void SendAkillDel(const char *, const char *) = 0;
|
||||
@@ -1275,7 +1276,17 @@ class IRCDProto {
|
||||
}
|
||||
SendKickInternal(source, chan, user, buf);
|
||||
}
|
||||
virtual void SendNoticeChanops(const char *, const char *, const char *) = 0;
|
||||
virtual void SendNoticeChanops(const char *source, const char *dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
if (fmt) {
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
SendNoticeChanopsInternal(source, dest, buf);
|
||||
}
|
||||
virtual void SendMessage(BotInfo *bi, const char *dest, const char *buf)
|
||||
{
|
||||
if (NSDefFlags & NI_MSG)
|
||||
|
||||
+1
-1
@@ -746,7 +746,7 @@ void bot_join(ChannelInfo * ci)
|
||||
/* Should we be invited? */
|
||||
if ((ci->c->mode & anope_get_invite_mode())
|
||||
|| (ci->c->limit && ci->c->usercount >= ci->c->limit))
|
||||
anope_SendNoticeChanops(NULL, ci->c->name,
|
||||
ircdproto->SendNoticeChanops(NULL, ci->c->name,
|
||||
"%s invited %s into the channel.",
|
||||
ci->bi->nick, ci->bi->nick);
|
||||
}
|
||||
|
||||
-12
@@ -43,18 +43,6 @@ void anope_ProcessUsermodes(User *user, int ac, const char **av)
|
||||
ircdproto->ProcessUsermodes(user, ac, av);
|
||||
}
|
||||
|
||||
void anope_SendNoticeChanops(const char *source, const char *dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
if (fmt) {
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
ircdproto->SendNoticeChanops(source, dest, buf);
|
||||
}
|
||||
|
||||
void anope_cmd_message(const char *source, const char *dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
@@ -872,7 +872,7 @@ int anope_event_motd(const char *source, int ac, const char **av)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void BahamutIRCdProto::SendNoticeChanops(const char *source, const char *dest, const char *buf)
|
||||
void BahamutIRCdProto::SendNoticeChanopsInternal(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
|
||||
|
||||
@@ -62,6 +62,7 @@ class BahamutIRCdProto : public IRCDProto {
|
||||
void SendSVSKillInternal(const char *, const char *, const char *);
|
||||
void SendModeInternal(const char *, const char *, const char *);
|
||||
void SendKickInternal(const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanopsInternal(const char *, const char *, const char *);
|
||||
public:
|
||||
void SendSVSNOOP(const char *, int);
|
||||
void SendAkillDel(const char *, const char *);
|
||||
@@ -70,7 +71,6 @@ class BahamutIRCdProto : public IRCDProto {
|
||||
void SendSVSMode(User *, int, const char **);
|
||||
void SendGuestNick(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanops(const char *, const char *, const char *);
|
||||
void SendBotOp(const char *, const char *);
|
||||
void SendJoin(const char *, const char *, time_t);
|
||||
void SendSQLineDel(const char *);
|
||||
|
||||
@@ -1019,7 +1019,7 @@ void CharybdisProto::SendKickInternal(const char *source, const char *chan, cons
|
||||
else send_cmd(UseTS6 ? (bi ? bi->uid.c_str() : source) : source, "KICK %s %s", chan, UseTS6 ? (u ? u->uid : user) : user);
|
||||
}
|
||||
|
||||
void CharybdisProto::SendNoticeChanops(const char *source, const char *dest, const char *buf)
|
||||
void CharybdisProto::SendNoticeChanopsInternal(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
BotInfo *bi = findbot(source);
|
||||
|
||||
@@ -50,13 +50,13 @@ class CharybdisProto : public IRCDTS6Proto {
|
||||
void SendSVSKillInternal(const char *, const char *, const char *);
|
||||
void SendModeInternal(const char *, const char *, const char *);
|
||||
void SendKickInternal(const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanopsInternal(const char *, const char *, const char *);
|
||||
public:
|
||||
void SendAkillDel(const char *, const char *);
|
||||
void SendVhostDel(User *);
|
||||
void SendAkill(const char *, const char *, const char *, time_t, time_t, const char *);
|
||||
void SendSVSMode(User *, int, const char **);
|
||||
void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanops(const char *, const char *, const char *);
|
||||
void SendBotOp(const char *, const char *);
|
||||
void SendQuit(const char *, const char *);
|
||||
void SendPong(const char *, const char *);
|
||||
|
||||
@@ -739,7 +739,7 @@ void InspIRCdProto::SendKickInternal(const char *source, const char *chan, const
|
||||
else send_cmd(source, "KICK %s %s :%s", chan, user, user);
|
||||
}
|
||||
|
||||
void InspIRCdProto::SendNoticeChanops(const char *source, const char *dest, const char *buf)
|
||||
void InspIRCdProto::SendNoticeChanopsInternal(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(ServerName, "NOTICE @%s :%s", dest, buf);
|
||||
|
||||
@@ -55,6 +55,7 @@ class InspIRCdProto : public IRCDProto {
|
||||
void SendSVSKillInternal(const char *, const char *, const char *);
|
||||
void SendModeInternal(const char *, const char *, const char *);
|
||||
void SendKickInternal(const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanopsInternal(const char *, const char *, const char *);
|
||||
public:
|
||||
void SendAkillDel(const char *, const char *);
|
||||
void SendTopic(BotInfo *, const char *, const char *, const char *, time_t);
|
||||
@@ -63,7 +64,6 @@ class InspIRCdProto : public IRCDProto {
|
||||
void SendSVSMode(User *, int, const char **);
|
||||
void SendGuestNick(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanops(const char *, const char *, const char *);
|
||||
void SendBotOp(const char *, const char *);
|
||||
void SendJoin(const char *, const char *, time_t);
|
||||
void SendSQLineDel(const char *);
|
||||
|
||||
@@ -949,7 +949,7 @@ void RatboxProto::SendKickInternal(const char *source, const char *chan, const c
|
||||
else send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "KICK %s %s", chan, UseTS6 ? (u ? u->uid : user) : user);
|
||||
}
|
||||
|
||||
void RatboxProto::SendNoticeChanops(const char *source, const char *dest, const char *buf)
|
||||
void RatboxProto::SendNoticeChanopsInternal(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
|
||||
|
||||
@@ -49,12 +49,12 @@ class RatboxProto : public IRCDTS6Proto {
|
||||
void SendSVSKillInternal(const char *, const char *, const char *);
|
||||
void SendModeInternal(const char *, const char *, const char *);
|
||||
void SendKickInternal(const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanopsInternal(const char *, const char *, const char *);
|
||||
public:
|
||||
void SendAkillDel(const char *, const char *);
|
||||
void SendAkill(const char *, const char *, const char *, time_t, time_t, const char *);
|
||||
void SendSVSMode(User *, int, const char **);
|
||||
void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanops(const char *, const char *, const char *);
|
||||
void SendBotOp(const char *, const char *);
|
||||
void SendQuit(const char *, const char *);
|
||||
void SendPong(const char *, const char *);
|
||||
|
||||
@@ -562,7 +562,7 @@ void UnrealIRCdProto::SendKickInternal(const char *source, const char *chan, con
|
||||
else send_cmd(source, "%s %s %s", send_token("KICK", "H"), chan, user);
|
||||
}
|
||||
|
||||
void UnrealIRCdProto::SendNoticeChanops(const char *source, const char *dest, const char *buf)
|
||||
void UnrealIRCdProto::SendNoticeChanopsInternal(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(source, "%s @%s :%s", send_token("NOTICE", "B"), dest, buf);
|
||||
|
||||
@@ -84,6 +84,7 @@ class UnrealIRCdProto : public IRCDProto {
|
||||
void SendSVSKillInternal(const char *, const char *, const char *);
|
||||
void SendModeInternal(const char *, const char *, const char *);
|
||||
void SendKickInternal(const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanopsInternal(const char *, const char *, const char *);
|
||||
public:
|
||||
void SendSVSNOOP(const char *, int);
|
||||
void SendAkillDel(const char *, const char *);
|
||||
@@ -93,7 +94,6 @@ class UnrealIRCdProto : public IRCDProto {
|
||||
void SendSVSMode(User *, int, const char **);
|
||||
void SendGuestNick(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *);
|
||||
void SendNoticeChanops(const char *, const char *, const char *);
|
||||
void SendBotOp(const char *, const char *);
|
||||
void SendJoin(const char *, const char *, time_t);
|
||||
void SendSQLineDel(const char *);
|
||||
|
||||
Reference in New Issue
Block a user