From 6f39dbb4ba8115491af6b2c6a7d1eef146bda317 Mon Sep 17 00:00:00 2001 From: peavey Date: Wed, 20 Jun 2007 11:04:55 +0000 Subject: And remember it's not only colorcodes we strip :>. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7392 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_stripcolor.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 3b51746ce..147f7012f 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -115,14 +115,12 @@ class ModuleStripColor : public Module virtual void ReplaceLine(std::string &sentence) { /* refactor this completely due to SQUIT bug since the old code would strip last char and replace with \0 --peavey */ - int seq = 0; + int seq; std::string::iterator i,safei; for (i = sentence.begin(); i != sentence.end(); ++i) { - if (((*i == 31) || (*i == 3))) - { + if ((*i == 3)) seq = 1; - } else if (seq && ( (*i >= '0') && (*i <= '9') || (*i == ',') ) ) { seq++; @@ -134,7 +132,7 @@ class ModuleStripColor : public Module else seq = 0; - if (seq) + if (seq || ((*i == 2) || (*i == 15) || (*i == 21) || (*i == 22) || (*i == 31))) { safei = i; --i; -- cgit v1.2.3