From 3ea6c80b9b15d50026ad33938e505b9acf8e1536 Mon Sep 17 00:00:00 2001 From: "trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 30 Oct 2004 03:28:46 +0000 Subject: BUILD : 1.7.5 (431) BUGS : 193 NOTES : 1. extern normalizeBuffer() helpful in some many other places not just botserv, 2. fixed BS ACT, if the string contained a control char 001, it would cause the string to act like SAY git-svn-id: svn://svn.anope.org/anope/trunk@431 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@286 5417fbe8-f217-4b02-8779-1006273d7864 --- src/botserv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/botserv.c b/src/botserv.c index a23616521..b376ed97f 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -59,7 +59,7 @@ static int do_badwords(User * u); static int do_say(User * u); static int do_act(User * u); void moduleAddBotServCmds(void); -char *normalizeBuffer(char *); + /*************************************************************************/ /* *INDENT-OFF* */ void moduleAddBotServCmds(void) { @@ -2434,6 +2434,7 @@ static int do_act(User * u) char *chan = strtok(NULL, " "); char *text = strtok(NULL, ""); + char tmpbuf[BUFSIZE]; if (!chan || !text) syntax_error(s_BotServ, u, "ACT", BOT_ACT_SYNTAX); @@ -2448,7 +2449,8 @@ static int do_act(User * u) else if (!check_access(u, ci, CA_SAY)) notice_lang(s_BotServ, u, ACCESS_DENIED); else { - anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s%c", 1, + strnrepl(text, BUFSIZE, "\001", ""); + anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s %c", 1, text, 1); ci->bi->lastmsg = time(NULL); if (logchan && LogBot) -- cgit