diff options
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r-- | src/plugins/irc/irc-server.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index b7746b1d0..ff8692347 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1287,6 +1287,7 @@ void irc_server_msgq_add_msg (struct t_irc_server *server, const char *msg) { struct t_irc_message *message; + char *data_without_weechat_colors; if (!server->unterminated_message && !msg[0]) return; @@ -1322,6 +1323,15 @@ irc_server_msgq_add_msg (struct t_irc_server *server, const char *msg) } else message->data = strdup (msg); + + /* replace WeeChat internal color codes by "?" */ + data_without_weechat_colors = weechat_string_remove_color (message->data, "?"); + if (data_without_weechat_colors) + { + free (message->data); + message->data = data_without_weechat_colors; + } + message->next_message = NULL; if (irc_msgq_last_msg) |