summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-05-09 11:14:59 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-05-09 11:14:59 +0000
commit3bf3f229281dc98c4c704b90fe109dbe751c1767 (patch)
treea49a03646289949c3f7acaa54f0aa648cc8df545 /src/irc
parent880e10b6d6ba195181f27240fc955fa358cd37bc (diff)
downloadweechat-3bf3f229281dc98c4c704b90fe109dbe751c1767.zip
Forget current nick when user manually disconnects from server
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc-server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c
index 5a4c25f2e..60b3e3c56 100644
--- a/src/irc/irc-server.c
+++ b/src/irc/irc-server.c
@@ -1958,6 +1958,13 @@ server_disconnect (t_irc_server *server, int reconnect)
else
server->reconnect_start = 0;
+ /* discard current nick if no reconnection asked */
+ if (!reconnect && server->nick)
+ {
+ free (server->nick);
+ server->nick = NULL;
+ }
+
gui_window_redraw_buffer (gui_current_window->buffer);
}