Mercurial > pidgin.yaz
diff libpurple/protocols/irc/irc.c @ 22958:f1dfc0d70d19
Fix irc nick collision handling, as requested by that demanding user elb.
Now we append the extra digit, unless the server responds with a shorter
nick than we requested, in which case we just change the last digit as
before.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 15 May 2008 15:22:04 +0000 |
parents | 252b96b6a32c |
children | 25161f5ea347 928f24e09279 |
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.c Thu May 15 13:26:55 2008 +0000 +++ b/libpurple/protocols/irc/irc.c Thu May 15 15:22:04 2008 +0000 @@ -404,7 +404,10 @@ return FALSE; } g_free(buf); - buf = irc_format(irc, "vn", "NICK", purple_connection_get_display_name(gc)); + username = purple_connection_get_display_name(gc); + buf = irc_format(irc, "vn", "NICK", username); + irc->reqnick = g_strdup(username); + irc->nickused = FALSE; if (irc_send(irc, buf) < 0) { g_free(buf); return FALSE; @@ -491,6 +494,7 @@ purple_circ_buffer_destroy(irc->outbuf); g_free(irc->mode_chars); + g_free(irc->reqnick); g_free(irc); }