summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-server.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-11-06 18:17:39 +0100
committerSébastien Helleu <flashcode@flashtux.org>2021-11-06 18:17:39 +0100
commit2f177dd18874a4ae87c1027cc4fbaec3bebbd6e6 (patch)
tree040fc87bfc717ab47377a07d3a766b93a989c0ad /src/plugins/irc/irc-server.c
parentedfc415e9e8472b4520d201b14d7ec94734fc8f4 (diff)
downloadweechat-2f177dd18874a4ae87c1027cc4fbaec3bebbd6e6.zip
irc: fix join of channels with name longer than 127 chars (closes #1717)
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r--src/plugins/irc/irc-server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index c136171e2..abcba968c 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -2302,7 +2302,8 @@ irc_server_rename (struct t_irc_server *server, const char *new_name)
{
int length;
char *mask, *pos_option, *new_option_name, charset_modifier[256];
- const char *buffer_name, *option_name;
+ char *buffer_name;
+ const char *option_name;
struct t_infolist *infolist;
struct t_config_option *ptr_option;
struct t_irc_channel *ptr_channel;
@@ -2366,6 +2367,8 @@ irc_server_rename (struct t_irc_server *server, const char *new_name)
weechat_buffer_set (ptr_channel->buffer, "name", buffer_name);
weechat_buffer_set (ptr_channel->buffer, "localvar_set_server",
server->name);
+ if (buffer_name)
+ free (buffer_name);
}
}
if (server->buffer)
@@ -2381,6 +2384,8 @@ irc_server_rename (struct t_irc_server *server, const char *new_name)
"irc.%s", server->name);
weechat_buffer_set (server->buffer, "localvar_set_charset_modifier",
charset_modifier);
+ if (buffer_name)
+ free (buffer_name);
}
return 1;