diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-20 11:04:55 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-20 11:04:55 +0000 |
commit | 6f39dbb4ba8115491af6b2c6a7d1eef146bda317 (patch) | |
tree | ba9468d7ba74fee15f74c0031aa1c79934bc9f72 | |
parent | 1bb1cb8f9f4fa3da13292d8209f941160e993899 (diff) |
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
-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; |