diff options
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 1 | ||||
-rw-r--r-- | src/bridge/colors.cpp | 17 | ||||
-rw-r--r-- | src/bridge/colors.hpp | 1 |
3 files changed, 0 insertions, 19 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index e24ab88..e08e2a4 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -28,7 +28,6 @@ std::string Bridge::sanitize_for_xmpp(const std::string& str) res = str; else res = utils::convert_to_utf8(str, "ISO-8859-1"); - remove_irc_colors(res); return res; } diff --git a/src/bridge/colors.cpp b/src/bridge/colors.cpp index b34ab4a..2f30354 100644 --- a/src/bridge/colors.cpp +++ b/src/bridge/colors.cpp @@ -3,22 +3,5 @@ #include <iostream> -void remove_irc_colors(std::string& str) { - auto it = std::remove_if(str.begin(), str.end(), - [](const char c) - { - if (c == IRC_COLOR_BOLD_CHAR || c == IRC_COLOR_COLOR_CHAR || - c == IRC_COLOR_FIXED_CHAR || c == IRC_COLOR_RESET_CHAR || - c == IRC_COLOR_REVERSE_CHAR || c == IRC_COLOR_REVERSE2_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 false; - } - ); - str.erase(it, str.end()); } diff --git a/src/bridge/colors.hpp b/src/bridge/colors.hpp index a4775e1..da4498c 100644 --- a/src/bridge/colors.hpp +++ b/src/bridge/colors.hpp @@ -16,6 +16,5 @@ #define IRC_COLOR_ITALIC_CHAR '\x1D' #define IRC_COLOR_UNDERLINE_CHAR '\x1F' -void remove_irc_colors(std::string& str); #endif // COLORS_INCLUDED |