From 5b5590f09599c3fca1fd2c2ed9a6908cdd201597 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 8 Dec 2015 16:32:50 +0100 Subject: Strip all control codes except \001 in InspIRCd::StripColor() Fixes issue #1100 reported by @uecasm --- src/helperfuncs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/helperfuncs.cpp') 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; -- cgit v1.3.1-10-gc9f91