summaryrefslogtreecommitdiff
path: root/include/services.h
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 19:25:27 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 19:25:27 +0000
commit50db0bb6807382c78f67a77670ecccf8038207a6 (patch)
treecb25b194d8b335919dce7655f2f2f1c2a0e71483 /include/services.h
parent877791d8b63ee88f4edf9bcd2261a6bbafcde8af (diff)
Replaced anope_SendQuit() with direct call to SendQuit() in IRCDProto class.
Added SendQuitInternal() to IRCDProto class, now SendQuit() is a stub to handle varargs. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1341 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/services.h')
-rw-r--r--include/services.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/include/services.h b/include/services.h
index 9be7c6ad4..62dda29c4 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1249,6 +1249,13 @@ class IRCDProto {
{
send_cmd(UseTS6 ? bi->uid : bi->nick, "PRIVMSG %s :%s", dest, buf);
}
+ virtual void SendQuitInternal(const char *source, const char *buf)
+ {
+ if (buf)
+ send_cmd(UseTS6 ? bi->uid : bi->nick, "QUIT :%s", buf);
+ else
+ send_cmd(UseTS6 ? bi->uid : bi->nick, "QUIT");
+ }
public:
virtual void SendSVSNOOP(const char *, int) { }
virtual void SendAkillDel(const char *, const char *) = 0;
@@ -1362,12 +1369,16 @@ class IRCDProto {
send_cmd(UseTS6 ? bi->uid : bi->nick, "PRIVMSG %s%s :%s", ircd->globaltldprefix, dest, msg);
}
virtual void SendBotOp(const char *, const char *) = 0;
- virtual void SendQuit(const char *source, const char *buf)
+ virtual void SendQuit(const char *source, const char *fmt, ...)
{
- if (buf)
- send_cmd(UseTS6 ? bi->uid : bi->nick, "QUIT :%s", buf);
- else
- send_cmd(UseTS6 ? bi->uid : bi->nick, "QUIT");
+ va_list args;
+ char buf[BUFSIZE] = "";
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ SendQuitInternal(source, buf);
}
virtual void SendPong(const char *servname, const char *who)
{