comparison src/protocols/irc/msgs.c @ 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 17142948653e
children 201617d49573
comparison
equal deleted inserted replaced
11385:78cd70f4834c 11386:4eaa0f7eb3c9
793 if (!args || !args[1]) 793 if (!args || !args[1])
794 return; 794 return;
795 795
796 newnick = strdup(args[1]); 796 newnick = strdup(args[1]);
797 end = newnick + strlen(newnick) - 1; 797 end = newnick + strlen(newnick) - 1;
798 /* try three fallbacks */ 798 /* try fallbacks */
799 if (*end == 2) *end = '3'; 799 if((*end < '9') && (*end >= '1')) {
800 else if (*end == 1) *end = '2'; 800 *end = *end + 1;
801 else *end = '1'; 801 } else *end = '1';
802 802
803 buf = irc_format(irc, "vn", "NICK", newnick); 803 buf = irc_format(irc, "vn", "NICK", newnick);
804 irc_send(irc, buf); 804 irc_send(irc, buf);
805 g_free(buf); 805 g_free(buf);
806 g_free(newnick); 806 g_free(newnick);