diff options
-rw-r--r-- | src/modules/m_stripcolor.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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; |