diff options
| author | 2015-12-08 16:32:50 +0100 | |
|---|---|---|
| committer | 2015-12-08 16:32:50 +0100 | |
| commit | 5b5590f09599c3fca1fd2c2ed9a6908cdd201597 (patch) | |
| tree | bb80df76e84795c77f71eb433774f5af49787a0d /src/helperfuncs.cpp | |
| parent | Deduplicate code in InspIRCd::FindNick() (diff) | |
Strip all control codes except \001 in InspIRCd::StripColor()
Fixes issue #1100 reported by @uecasm
Diffstat (limited to 'src/helperfuncs.cpp')
| -rw-r--r-- | src/helperfuncs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 78d272b5f..6217eb20b 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -127,7 +127,8 @@ void InspIRCd::StripColor(std::string &sentence) else seq = 0; - if (seq || ((*i == 2) || (*i == 15) || (*i == 22) || (*i == 21) || (*i == 31))) + // Strip all control codes too except \001 for CTCP + if (seq || ((*i < 32) && (*i != 1))) i = sentence.erase(i); else ++i; |
