fix two bugs in reconnecting code
authordiv0 <div0@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Tue, 10 Feb 2009 07:02:39 +0000 (07:02 +0000)
committerdiv0 <div0@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Tue, 10 Feb 2009 07:02:39 +0000 (07:02 +0000)
git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5821 f962a42d-fe04-0410-a3ab-8c8b0445ebaa

server/rcon2irc/rcon2irc.pl

index ec614ec..f75cce6 100755 (executable)
@@ -799,15 +799,15 @@ sub irc_error()
        delete $channels{irc};
        schedule sub {
                my ($timer) = @_;
-               if(!defined $store{slots_full})
+               if(!defined $store{slots_active})
                {
                        # DP is not running, then delay IRC reconnecting
                        #use Data::Dumper; print Dumper \$timer;
-                       schedule $timer => 1;;
+                       schedule $timer => 1;
                        return;
                        # this will keep irc_error_active
                }
-               $channels{irc} = new Channel::Line(new Connection::Socket(tcp => "" => $config{irc_server}));
+               $channels{irc} = new Channel::Line(new Connection::Socket(tcp => "" => $config{irc_server} => 6667));
                delete $store{$_} for grep { /^irc_/ } keys %store;
                $store{irc_nick} = "";
                schedule sub {