r5264 - trunk/Docs/server/rcon2irc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Dec 18 03:07:58 EST 2008


Author: div0
Date: 2008-12-18 03:07:53 -0500 (Thu, 18 Dec 2008)
New Revision: 5264

Modified:
   trunk/Docs/server/rcon2irc/rcon2irc.pl
Log:
don't crash if no status received yet


Modified: trunk/Docs/server/rcon2irc/rcon2irc.pl
===================================================================
--- trunk/Docs/server/rcon2irc/rcon2irc.pl	2008-12-18 08:02:25 UTC (rev 5263)
+++ trunk/Docs/server/rcon2irc/rcon2irc.pl	2008-12-18 08:07:53 UTC (rev 5264)
@@ -964,9 +964,10 @@
 			my ($match) = $1;
 			my $found = 0;
 			my $foundany = 0;
-			for my $slot(@{$store{playerslots_active}})
+			for my $slot(@{$store{playerslots_active} || []})
 			{
 				my $s = $store{"playerslot_$slot"};
+				next unless $s;
 				if(not defined $match or index(color_dp2none($s->{name}), $match) >= 0)
 				{
 					out irc => 0, sprintf 'PRIVMSG %s :%-21s %2i %4i %8s %4i #%-3u %s', $nick, $s->{ip}, $s->{pl}, $s->{ping}, $s->{time}, $s->{frags}, $slot, color_dp2irc $s->{name};




More information about the nexuiz-commits mailing list