diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-02-21 08:35:26 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-02-21 08:35:26 +0100 |
commit | 770152dea77e3256f345671d189767e9d0e3abe5 (patch) | |
tree | 1bb22839774b02b3d05d5681a612e092ecfe5519 /src/plugins/irc/irc-channel.c | |
parent | c9c8625581b2afba581e8832830a6662aac45c09 (diff) | |
download | weechat-770152dea77e3256f345671d189767e9d0e3abe5.zip |
irc: remove useless rename of channel buffer on JOIN received with different case (closes #336)
This bug was introduced by commit 624083f41a6b8abc1a566b33f54bfc226d13886f.
Diffstat (limited to 'src/plugins/irc/irc-channel.c')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index c8e5ef5f0..74bc9ba39 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -501,51 +501,6 @@ irc_channel_new (struct t_irc_server *server, int channel_type, } /* - * Renames a channel. - */ - -void -irc_channel_rename (struct t_irc_server *server, - struct t_irc_channel *channel, - const char *new_name) -{ - struct t_irc_channel *ptr_channel; - char *buffer_name; - const char *short_name; - - /* check if another channel exists with this exact name */ - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if ((ptr_channel != channel) - && (strcmp (ptr_channel->name, new_name) == 0)) - { - return; - } - } - - /* rename the channel in buffer */ - if (channel->buffer) - { - short_name = weechat_buffer_get_string (channel->buffer, "short_name"); - if (!short_name || (strcmp (short_name, channel->name) == 0)) - { - /* update the short_name only if it was not changed by the user */ - weechat_buffer_set (channel->buffer, "short_name", new_name); - } - buffer_name = irc_buffer_build_name (server->name, - new_name); - weechat_buffer_set (channel->buffer, "name", buffer_name); - weechat_buffer_set (channel->buffer, "localvar_set_channel", new_name); - } - - /* rename the irc channel */ - if (channel->name) - free (channel->name); - channel->name = strdup (new_name); -} - -/* * Adds groups in nicklist for a channel. */ |