summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-07-21 11:16:50 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-07-21 11:16:50 +0200
commitd5c4342bceadc4d3c3997986cb48f3bd4235e8f8 (patch)
tree584befe3297698c8a5ca5c9f4b9ab23207b1fbb1 /src/plugins
parent569c93c6fb440b986d456ddd2d5dd689ff78fa81 (diff)
downloadweechat-d5c4342bceadc4d3c3997986cb48f3bd4235e8f8.zip
irc: fix display of TOPIC message with an empty trailing parameter
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-protocol.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 67941d6bb..6ebd0caf4 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -3258,7 +3258,7 @@ IRC_PROTOCOL_CALLBACK(topic)
if (ptr_channel)
irc_channel_join_smart_filtered_unmask (ptr_channel, nick);
- if (str_topic)
+ if (str_topic && str_topic[0])
{
topic_color = irc_color_decode (
str_topic,
@@ -3361,7 +3361,10 @@ IRC_PROTOCOL_CALLBACK(topic)
}
if (ptr_channel)
- irc_channel_set_topic (ptr_channel, str_topic);
+ {
+ irc_channel_set_topic (ptr_channel,
+ (str_topic && str_topic[0]) ? str_topic : NULL);
+ }
if (str_topic)
free (str_topic);