summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-11-10 12:21:18 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-11-10 12:21:18 +0100
commit9ea73fda4b407fe13a97039b9cdf00b6577a1a33 (patch)
tree00445d6b71575d34a5dcea62730d1cd70518014b /src
parent32488331253f2379e0144b45bc036ee31623df07 (diff)
downloadweechat-9ea73fda4b407fe13a97039b9cdf00b6577a1a33.zip
Fix bug with /upgrade on ssl servers with prefix modes and chars
The value of isupport, prefix_modes and prefix_chars in irc server are now removed on connection, not on disconnection.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-server.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 30656a094..d004160f9 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -3255,6 +3255,23 @@ irc_server_connect (struct t_irc_server *server)
return 0;
}
+ /* free some old values (from a previous connection to server) */
+ if (server->isupport)
+ {
+ free (server->isupport);
+ server->isupport = NULL;
+ }
+ if (server->prefix_modes)
+ {
+ free (server->prefix_modes);
+ server->prefix_modes = NULL;
+ }
+ if (server->prefix_chars)
+ {
+ free (server->prefix_chars);
+ server->prefix_chars = NULL;
+ }
+
proxy_type = NULL;
proxy_ipv6 = NULL;
proxy_address = NULL;
@@ -3543,21 +3560,6 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
server->nick_modes = NULL;
weechat_bar_item_update ("input_prompt");
}
- if (server->isupport)
- {
- free (server->isupport);
- server->isupport = NULL;
- }
- if (server->prefix_modes)
- {
- free (server->prefix_modes);
- server->prefix_modes = NULL;
- }
- if (server->prefix_chars)
- {
- free (server->prefix_chars);
- server->prefix_chars = NULL;
- }
server->is_away = 0;
server->away_time = 0;
server->lag = 0;