[gaim-migrate @ 13614]

Wed, 31 Aug 2005 15:57:20 +0000

author
Thomas Butter <tbutter@users.sourceforge.net>
date
Wed, 31 Aug 2005 15:57:20 +0000
changeset 11386
89c0c029ecfd
parent 11385
38ca1438e055
child 11387
257041d4ee60

[gaim-migrate @ 13614]
fix for alternate nicks in irc.
it always retried the old nick with the last char replaced by '1'

src/protocols/irc/msgs.c file | annotate | diff | comparison | revisions
--- a/src/protocols/irc/msgs.c	Wed Aug 31 15:07:46 2005 +0000
+++ b/src/protocols/irc/msgs.c	Wed Aug 31 15:57:20 2005 +0000
@@ -795,10 +795,10 @@
 
 	newnick = strdup(args[1]);
 	end = newnick + strlen(newnick) - 1;
-	/* try three fallbacks */
-	if (*end == 2) *end = '3';
-	else if (*end == 1) *end = '2';
-	else *end = '1';
+	/* try fallbacks */
+	if((*end < '9') && (*end >= '1')) {
+			*end = *end + 1;
+	} else *end = '1';
 
 	buf = irc_format(irc, "vn", "NICK", newnick);
 	irc_send(irc, buf);

mercurial