diff libpurple/protocols/irc/cmds.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 f332db29a854
children dc359ea9eb9a
line wrap: on
line diff
--- a/libpurple/protocols/irc/cmds.c	Thu May 15 13:26:55 2008 +0000
+++ b/libpurple/protocols/irc/cmds.c	Thu May 15 15:22:04 2008 +0000
@@ -256,6 +256,9 @@
 		return 0;
 
 	buf = irc_format(irc, "v:", "NICK", args[0]);
+	g_free(irc->reqnick);
+	irc->reqnick = g_strdup(args[0]);
+	irc->nickused = FALSE;
 	irc_send(irc, buf);
 	g_free(buf);