From e266fc71d3182d2db0827c2fdb0b0840e80ae893 Mon Sep 17 00:00:00 2001 From: div0 Date: Tue, 10 Feb 2009 06:14:55 +0000 Subject: [PATCH] fix the last commit git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5819 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- server/rcon2irc/rcon2irc.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/rcon2irc/rcon2irc.pl b/server/rcon2irc/rcon2irc.pl index d166fe4b2..f31f9dc1f 100755 --- a/server/rcon2irc/rcon2irc.pl +++ b/server/rcon2irc/rcon2irc.pl @@ -870,7 +870,7 @@ sub irc_joinstage($) # we failed to get an initial nickname # change ours a bit and try again - my @alternates = ($config{irc_nick}, grep { $_ ne "" } split /\s+/, $config{irc_nick_alternates}); + my @alternates = uniq ($config{irc_nick}, grep { $_ ne "" } split /\s+/, $config{irc_nick_alternates}); my $nextnick = undef; for(0..@alternates-2) { @@ -879,12 +879,16 @@ sub irc_joinstage($) $nextnick = $alternates[$_+1]; } } - if($store{irc_nick_requested} eq $alternates[@alternates-1]) + if($store{irc_nick_requested} eq $alternates[@alternates-1]) # this will only happen once { $store{irc_nick_requested} = $alternates[0]; # but don't set nextnick, so we edit it } - if(not defined $nextnick) + if(defined $nextnick) + { + $store{irc_nick_requested} = $nextnick; + } + else { for(;;) { -- 2.39.2