]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcaps.cpp
Fix for last nights blockcaps tweak to make it a little more accurate
[user/henk/code/inspircd.git] / src / modules / m_blockcaps.cpp
index 88d7ab5f4d4a9f755785f842f80b7e92e20f4a2f..d45526df9d63e53d2b67e49797c83b9de216a10f 100644 (file)
@@ -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];
                                }