Don't change the "wanted nick" when receiving NICK event from server, unless

we did the /NICK change. This is useful with the new irc servers changing
your nick to your UID instead of killing you, at reconnect time you'd get
"invalid nick" when irssi would try setting the UID as your nick..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2351 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-01-28 05:28:25 +00:00 committed by cras
commit 08c23ce6d4
4 changed files with 14 additions and 5 deletions

View file

@ -490,9 +490,7 @@ void server_connect_unref(SERVER_CONNECT_REC *conn)
void server_change_nick(SERVER_REC *server, const char *nick)
{
g_free(server->connrec->nick);
g_free(server->nick);
server->connrec->nick = g_strdup(nick);
server->nick = g_strdup(nick);
signal_emit("server nick changed", 1, server);