summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 21:02:37 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 21:02:37 +0000
commit6c305a3d6731191899f4331be56a071dab66d194 (patch)
tree59a7bf69f0a2b035bc84580552e0745977307a82 /include
parentf3f1b97a1ab782a3419fe20ae06d3e3535a4ddae (diff)
Replaced anope_SendGlobops() with direct call to SendGlobops() in IRCDProto class.
Added SendGlobopsInternal() function to IRCDProto class, now SendGlobops() is a stub to handle varargs. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1347 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/extern.h1
-rw-r--r--include/services.h23
2 files changed, 17 insertions, 7 deletions
diff --git a/include/extern.h b/include/extern.h
index 0f1e8577f..1325ad2ba 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1118,7 +1118,6 @@ E void anope_cmd_chgident(const char *nick, const char *vIdent);
E void anope_SendVhost(const char *nick, const char *vIdent, const char *vhost); /* CHGHOST + CHGIDENT */
E void anope_SendConnect(); /* Connect */
E void anope_cmd_ea(); /* EA */
-E void anope_SendGlobops(const char *source, const char *fmt, ...); /* GLOBOPS */
E void anope_cmd_tmode(const char *source, const char *dest, const char *fmt, ...); /* TMODE */
E void anope_SendBanDel(const char *name, const char *nick); /* MODE -b */
E void anope_cmd_netinfo(int ac, const char **av); /* NETINFO */
diff --git a/include/services.h b/include/services.h
index 6fc0cf8cf..b9c81290e 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1263,6 +1263,14 @@ class IRCDProto {
else
send_cmd(nick, "PART %s", chan);
}
+ virtual void SendGlobopsInternal(const char *source, const char *buf)
+ {
+ BotInfo *bi = findbot(source);
+ if (bi)
+ send_cmd(UseTS6 ? bi->uid : bi->nick, "GLOBOPS :%s", buf);
+ else
+ send_cmd(ServerName, "GLOBOPS :%s", buf);
+ }
public:
virtual void SendSVSNOOP(const char *, int) { }
virtual void SendAkillDel(const char *, const char *) = 0;
@@ -1409,13 +1417,16 @@ class IRCDProto {
}
else SendPartInternal(nick, chan, NULL);
}
- virtual void SendGlobops(const char *source, const char *buf)
+ virtual void SendGlobops(const char *source, const char *fmt, ...)
{
- BotInfo *bi = findbot(source)
- if (bi)
- send_cmd(UseTS6 ? bi->uid : bi->nick, "GLOBOPS :%s", buf);
- else
- send_cmd(ServerName, "GLOBOPS :%s", buf);
+ va_list args;
+ char buf[BUFSIZE] = "";
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ SendGlobopsInternal(source, buf);
}
virtual void SendSQLine(const char *, const char *) = 0;
virtual void SendSquit(const char *servname, const char *message)