diff -r cf0c4c97d882 -r 7ba846a8187f libpurple/protocols/irc/irc.c --- 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); }