summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-30 06:15:58 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-30 06:15:58 +0000
commit89c2c02904d1f407113ed30a7c2f4180d51f2abb (patch)
tree90e5f52103f8303b5bf6bbe3ba32deee0949624c /src
parent6245821dfe0b23b1d0b8b26219ae1f9e6d71a72c (diff)
Fix bug #1073, fantasy commands in CTCP ACTIONs will now be ignored instead of processed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2217 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/botserv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/botserv.c b/src/botserv.c
index 6cbdb4302..810768c00 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -135,6 +135,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
int16 cstatus = 0;
char *cmd;
UserData *ud;
+ bool was_action = false;
if (!u || !buf || !ci) {
return;
@@ -150,7 +151,10 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
* but the ACTION may create strange behaviours with the
* caps or badwords kickers */
if (!strnicmp(buf, "\1ACTION ", 8))
+ {
buf += 8;
+ was_action = true;
+ }
/* Now we can make kicker stuff. We try to order the checks
* from the fastest one to the slowest one, since there's
@@ -411,7 +415,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
/* Fantaisist commands */
- if (buf && (ci->botflags & BS_FANTASY) && *buf == *BSFantasyCharacter) {
+ if (buf && (ci->botflags & BS_FANTASY) && *buf == *BSFantasyCharacter && !was_action) {
cmd = strtok(buf, " ");
if (cmd && (cmd[0] == *BSFantasyCharacter)) {
@@ -436,7 +440,8 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
if (params)
send_event(event_name, 4, cmd, u->nick, ci->name, params);
else
- send_event(event_name, 3, cmd, u->nick, ci->name);}
+ send_event(event_name, 3, cmd, u->nick, ci->name);
+ }
}
}