From 765f561952d1a77a445128d7cbdc0da0a16c1706 Mon Sep 17 00:00:00 2001 From: "Naram Qashat cyberbotx@cyberbotx.com" Date: Thu, 2 Oct 2008 18:37:32 +0000 Subject: Replaced anope_SendKick() with direct call to SendKick() in IRCDProto class. Also added SendKickInternal() function to IRCDProto class, now SendKick() is a stub to handle varargs. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1331 5417fbe8-f217-4b02-8779-1006273d7864 --- include/extern.h | 1 - include/services.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/extern.h b/include/extern.h index 7601b2b8f..c2231ff01 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1124,7 +1124,6 @@ E void anope_cmd_ea(); /* EA */ E void anope_SendGlobops(const char *source, const char *fmt, ...); /* GLOBOPS */ E void anope_SendInvite(const char *source, const char *chan, const char *nick); /* INVITE */ E void anope_SendJoin(const char *user, const char *channel, time_t chantime); /* JOIN */ -E void anope_SendKick(const char *source, const char *chan, const char *user, const char *fmt, ...); /* KICK */ 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_SendBotOp(const char *nick, const char *chan); /* MODE BotServ */ diff --git a/include/services.h b/include/services.h index ca04f68b2..ce82b97dd 100644 --- a/include/services.h +++ b/include/services.h @@ -1232,6 +1232,7 @@ class IRCDProto; 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; public: virtual void SendSVSNOOP(const char *, int) { } virtual void SendAkillDel(const char *, const char *) = 0; @@ -1263,7 +1264,17 @@ class IRCDProto { SendModeInternal(source, dest, buf); } virtual void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *) = 0; - virtual void SendKick(const char *, const char *, const char *, const char *) = 0; + virtual void SendKick(const char *source, const char *chan, const char *user, const char *fmt, ...) + { + va_list args; + char buf[BUFSIZE] = ""; + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + SendKickInternal(source, chan, user, buf); + } virtual void SendNoticeChanops(const char *, const char *, const char *) = 0; virtual void SendMessage(BotInfo *bi, const char *dest, const char *buf) { -- cgit