r3676 - trunk/Docs/server/rcon2irc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jun 1 14:57:43 EDT 2008


Author: div0
Date: 2008-06-01 14:57:43 -0400 (Sun, 01 Jun 2008)
New Revision: 3676

Modified:
   trunk/Docs/server/rcon2irc/rcon2irc.pl
Log:
fix some command outputs; fix typo that crashed it on disconnect/reconnect


Modified: trunk/Docs/server/rcon2irc/rcon2irc.pl
===================================================================
--- trunk/Docs/server/rcon2irc/rcon2irc.pl	2008-06-01 18:26:40 UTC (rev 3675)
+++ trunk/Docs/server/rcon2irc/rcon2irc.pl	2008-06-01 18:57:43 UTC (rev 3676)
@@ -980,15 +980,20 @@
 		return 0;
 	} ],
 
+	# chat: Nexuiz server -> IRC channel, nick set
+	[ dp => q{:join:(\d+):(?:player|bot):(.*)} => sub {
+		my ($id, $nick) = @_;
+		$nick = color_dp2irc $nick;
+		$store{"playernick_$id"} = $nick;
+		return 0;
+	} ],
+
 	# chat: Nexuiz server -> IRC channel, nick change/set
-	[ dp => q{:(name|join):(\d+):(.*)} => sub {
-		my ($type, $id, $nick) = @_;
+	[ dp => q{:name:(\d+):(.*)} => sub {
+		my ($id, $nick) = @_;
 		$nick = color_dp2irc $nick;
 		my $oldnick = $store{"playernick_$id"};
-		if($type eq 'name')
-		{
-			out irc => 0, "PRIVMSG $config{irc_channel} :* $oldnick\017 is now known as $nick";
-		}
+		out irc => 0, "PRIVMSG $config{irc_channel} :* $oldnick\017 is now known as $nick";
 		$store{"playernick_$id"} = $nick;
 		return 0;
 	} ],
@@ -998,7 +1003,7 @@
 		my ($id, $command) = @_;
 		$command = color_dp2irc $command;
 		my $oldnick = $store{"playernick_$id"};
-		out irc => 0, "PRIVMSG $config{irc_channel} :* $oldnick\017 calls a vote for $command";
+		out irc => 0, "PRIVMSG $config{irc_channel} :* $oldnick\017 calls a vote for \"$command\"";
 		return 0;
 	} ],
 
@@ -1022,7 +1027,7 @@
 	[ dp => q{:vote:vdo:(\d+):(.*)} => sub {
 		my ($id, $command) = @_;
 		my $oldnick = $store{"playernick_$id"};
-		out irc => 0, "PRIVMSG $config{irc_channel} :* $oldnick\017 used his master status to do $command";
+		out irc => 0, "PRIVMSG $config{irc_channel} :* $oldnick\017 used his master status to do \"$command\"";
 		return 0;
 	} ],
 
@@ -1261,7 +1266,7 @@
 		{
 			# IRC connection apparently broke
 			# so... KILL IT WITH FIRE
-			channels{system}->send("error irc", 0);
+			$channels{system}->send("error irc", 0);
 		}
 		else
 		{




More information about the nexuiz-commits mailing list