From 0d446447c73059c09fc41ecbd78ca1309d8e6a30 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 May 2008 16:43:17 +0000 Subject: 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 --- src/modules/m_blockcaps.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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]; } -- cgit v1.2.3