summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-10 16:43:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-10 16:43:17 +0000
commit0d446447c73059c09fc41ecbd78ca1309d8e6a30 (patch)
tree1069f80c0569290dddc4b437c838282f9a5e03b4
parente7c95d470d08ed4da36e1bdc863903246c2d9683 (diff)
Fix for last nights blockcaps tweak to make it a little more accurate
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9692 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_blockcaps.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index 88d7ab5f4..d45526df9 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -69,12 +69,18 @@ public:
{
int caps = 0;
const char* actstr = "\1ACTION ";
+ int act = 0;
for (std::string::iterator i = text.begin(); i != text.end(); i++)
{
/* Smart fix for suggestion from Jobe, ignore CTCP ACTION (part of /ME) */
- if (*actstr && *i == *actstr++)
+ if (*actstr && *i == *actstr++ && act != -1)
+ {
+ act++;
continue;
+ }
+ else
+ act = -1;
caps += capsmap[(unsigned char)*i];
}