diff options
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 5ae43428f..22694732c 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -5075,6 +5075,7 @@ IRC_PROTOCOL_CALLBACK(470) struct t_gui_buffer *ptr_buffer; struct t_gui_lines *own_lines; const char *buffer_name, *short_name, *localvar_channel; + char *old_channel_lower, *new_channel_lower; int lines_count; irc_protocol_cb_generic_error (server, @@ -5126,6 +5127,46 @@ IRC_PROTOCOL_CALLBACK(470) ptr_buffer); } } + + + old_channel_lower = strdup (argv[3]); + if (old_channel_lower) + { + weechat_string_tolower (old_channel_lower); + new_channel_lower = strdup (argv[4]); + if (new_channel_lower) + { + weechat_string_tolower (new_channel_lower); + + if (weechat_hashtable_has_key (server->join_manual, + old_channel_lower)) + { + weechat_hashtable_set (server->join_manual, + new_channel_lower, + weechat_hashtable_get ( + server->join_manual, + old_channel_lower)); + weechat_hashtable_remove (server->join_manual, + old_channel_lower); + } + + if (weechat_hashtable_has_key (server->join_noswitch, + old_channel_lower)) + { + weechat_hashtable_set (server->join_noswitch, + new_channel_lower, + weechat_hashtable_get ( + server->join_noswitch, + old_channel_lower)); + weechat_hashtable_remove (server->join_noswitch, + old_channel_lower); + } + + free (new_channel_lower); + } + + free (old_channel_lower); + } } return WEECHAT_RC_OK; |