summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-30 06:17:26 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-30 06:17:26 +0000
commit35ca9adc25b1fc79600184ae40db8f33a397ed74 (patch)
tree0ca200a2aa1cf9bc3dab16b3160f24f39fd758bd /src
parent8f3958d0f43bb884f3b51681857349ccf48b8b34 (diff)
Backport of bugfix for bug #1073 from SVN r2217, fantasy commands in CTCP ACTIONs will now be ignored instead of processed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2218 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/botserv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/botserv.c b/src/botserv.c
index 47da60ca0..365c78dde 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -134,6 +134,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
int16 cstatus = 0;
char *cmd;
UserData *ud;
+ int was_action = 0;
if (!u || !buf || !ci) {
return;
@@ -148,8 +149,10 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
* at the end, because one character just doesn't matter,
* but the ACTION may create strange behaviours with the
* caps or badwords kickers */
- if (!strnicmp(buf, "\1ACTION ", 8))
+ if (!strnicmp(buf, "\1ACTION ", 8)) {
buf += 8;
+ was_action = 1;
+ }
/* Now we can make kicker stuff. We try to order the checks
* from the fastest one to the slowest one, since there's
@@ -410,7 +413,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)) {