changeset 11386:4eaa0f7eb3c9

[gaim-migrate @ 13614] fix for alternate nicks in irc. it always retried the old nick with the last char replaced by '1' committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Wed, 31 Aug 2005 15:57:20 +0000
parents 78cd70f4834c
children 012bb2eed54b
files src/protocols/irc/msgs.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);