summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_stripcolor.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index 9b3f8c2f1..97df7f193 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -112,7 +112,7 @@ class ModuleStripColor : public Module
/* refactor this completely due to SQUIT bug since the old code would strip last char and replace with \0 --peavey */
int seq = 0;
std::string::iterator i,safei;
- for (i = sentence.begin(); i != sentence.end(); ++i)
+ for (i = sentence.begin(); i != sentence.end();)
{
if ((*i == 3))
seq = 1;
@@ -134,12 +134,18 @@ class ModuleStripColor : public Module
safei = i;
--i;
sentence.erase(safei);
+ ++i;
+ ServerInstance->Logs->Log("m_stripcolor", DEBUG, "Sentence: %s iter pos %c", sentence.c_str(), *i);
}
else
{
sentence.erase(i);
i = sentence.begin();
- } }
+ ServerInstance->Logs->Log("m_stripcolor", DEBUG, "Sentence begin(): %s iter pos %c", sentence.c_str(), *i);
+ }
+ }
+ else
+ ++i;
}
}