diff options
| author | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-02 21:02:37 +0000 |
|---|---|---|
| committer | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-02 21:02:37 +0000 |
| commit | 6c305a3d6731191899f4331be56a071dab66d194 (patch) | |
| tree | 59a7bf69f0a2b035bc84580552e0745977307a82 /include/services.h | |
| parent | f3f1b97a1ab782a3419fe20ae06d3e3535a4ddae (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/services.h')
| -rw-r--r-- | include/services.h | 23 |
1 files changed, 17 insertions, 6 deletions
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) |
