summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-02-21 08:35:26 +0100
committerSébastien Helleu <flashcode@flashtux.org>2015-02-21 08:35:26 +0100
commit770152dea77e3256f345671d189767e9d0e3abe5 (patch)
tree1bb22839774b02b3d05d5681a612e092ecfe5519 /src/plugins/irc
parentc9c8625581b2afba581e8832830a6662aac45c09 (diff)
downloadweechat-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')
-rw-r--r--src/plugins/irc/irc-channel.c45
-rw-r--r--src/plugins/irc/irc-channel.h3
-rw-r--r--src/plugins/irc/irc-protocol.c2
3 files changed, 0 insertions, 50 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.
*/
diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h
index f6141c84d..08f7f1e9b 100644
--- a/src/plugins/irc/irc-channel.h
+++ b/src/plugins/irc/irc-channel.h
@@ -88,9 +88,6 @@ extern struct t_irc_channel *irc_channel_new (struct t_irc_server *server,
const char *channel_name,
int switch_to_channel,
int auto_switch);
-extern void irc_channel_rename (struct t_irc_server *server,
- struct t_irc_channel *channel,
- const char *new_name);
extern void irc_channel_add_nicklist_groups (struct t_irc_server *server,
struct t_irc_channel *channel);
extern void irc_channel_set_buffer_title (struct t_irc_channel *channel);
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 25acbc6be..96bffaf2b 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -697,8 +697,6 @@ IRC_PROTOCOL_CALLBACK(join)
if (ptr_channel)
{
ptr_channel->part = 0;
- if (strcmp (ptr_channel->name, pos_channel) != 0)
- irc_channel_rename (server, ptr_channel, pos_channel);
}
else
{