Do not crash on special chars in the content of message
That’s ugly, and we need to sanitize everything properly, and also handle these special messages.
This commit is contained in:
@@ -11,7 +11,11 @@ void remove_irc_colors(std::string& str)
|
|||||||
if (c == IRC_COLOR_BOLD_CHAR || c == IRC_COLOR_COLOR_CHAR ||
|
if (c == IRC_COLOR_BOLD_CHAR || c == IRC_COLOR_COLOR_CHAR ||
|
||||||
c == IRC_COLOR_FIXED_CHAR || c == IRC_COLOR_RESET_CHAR ||
|
c == IRC_COLOR_FIXED_CHAR || c == IRC_COLOR_RESET_CHAR ||
|
||||||
c == IRC_COLOR_REVERSE_CHAR || c == IRC_COLOR_REVERSE2_CHAR ||
|
c == IRC_COLOR_REVERSE_CHAR || c == IRC_COLOR_REVERSE2_CHAR ||
|
||||||
c == IRC_COLOR_UNDERLINE_CHAR || c == IRC_COLOR_ITALIC_CHAR)
|
c == IRC_COLOR_UNDERLINE_CHAR || c == IRC_COLOR_ITALIC_CHAR ||
|
||||||
|
// HACK: until we properly handle things
|
||||||
|
// like ^AVERSION^A, remove the ^A chars
|
||||||
|
// here.
|
||||||
|
c == '\u0001')
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user