From d9771fe0aa0d9270279c4f52f4231ece79adbe19 Mon Sep 17 00:00:00 2001 From: "Naram Qashat cyberbotx@cyberbotx.com" Date: Thu, 2 Oct 2008 19:14:00 +0000 Subject: Added SendAction() function to IRCDProto class to replace use of anope_cmd_notice(). git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1337 5417fbe8-f217-4b02-8779-1006273d7864 --- include/services.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/services.h') diff --git a/include/services.h b/include/services.h index 4b9af9c48..9be7c6ad4 100644 --- a/include/services.h +++ b/include/services.h @@ -1326,6 +1326,21 @@ class IRCDProto { BotInfo *bi = findbot(source); SendNoticeInternal(bi, dest, buf); } + virtual void SendAction(const char *source, const char *dest, const char *fmt, ...) + { + va_list args; + char buf[BUFSIZE] = "", actionbuf[BUFSIZE] = ""; + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + else return; + if (!*buf) return; + snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s%c", 1, buf, 1); + BotInfo *bi = findbot(source); + SendPrivmsgInternal(bi, dest, actionbuf); + } virtual void SendPrivmsg(const char *source, const char *dest, const char *fmt, ...) { va_list args; -- cgit