summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-11-18 16:00:12 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-11-18 16:00:12 +0100
commit7a0d3469333710e3dd6a27466dfb35533deb7a1e (patch)
treedd952be2a760e84a6d971d3a83abf86f589c8485
parent6f0b6295c529eaaa2dda4e9b821e152ce47e698d (diff)
downloadweechat-7a0d3469333710e3dd6a27466dfb35533deb7a1e.zip
irc: remove autorejoin on channels when disconnected from server (bug #32207)
-rw-r--r--ChangeLog3
-rw-r--r--src/plugins/irc/irc-channel.c2
-rw-r--r--src/plugins/irc/irc-server.c5
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c9521781f..ec62ecb3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.7-dev, 2011-11-17
+v0.3.7-dev, 2011-11-18
Version 0.3.7 (under dev!)
@@ -31,6 +31,7 @@ Version 0.3.7 (under dev!)
* core: enable background process under Cygwin to connect to servers, fix
reconnection problem (bug #34626)
* api: add new functions strcasecmp_range and strncasecmp_range
+* irc: remove autorejoin on channels when disconnected from server (bug #32207)
* irc: display messages kick/kill/mode/topic even if nick is ignored
(bug #34853)
* irc: add case insensitive string comparison based on casemapping of server
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c
index 82d48b4c6..9348e7ee2 100644
--- a/src/plugins/irc/irc-channel.c
+++ b/src/plugins/irc/irc-channel.c
@@ -814,7 +814,7 @@ irc_channel_free (struct t_irc_server *server, struct t_irc_channel *channel)
if (channel->pv_remote_nick_color)
free (channel->pv_remote_nick_color);
if (channel->hook_autorejoin)
- weechat_unhook(channel->hook_autorejoin);
+ weechat_unhook (channel->hook_autorejoin);
if (channel->nicks_speaking[0])
weechat_list_free (channel->nicks_speaking[0]);
if (channel->nicks_speaking[1])
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index c6811c0f8..8f323bc1a 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -3624,6 +3624,11 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
ptr_channel = ptr_channel->next_channel)
{
irc_nick_free_all (server, ptr_channel);
+ if (ptr_channel->hook_autorejoin)
+ {
+ weechat_unhook (ptr_channel->hook_autorejoin);
+ ptr_channel->hook_autorejoin = NULL;
+ }
weechat_printf (ptr_channel->buffer,
_("%s%s: disconnected from server"),
"",