]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
pickip in rcon2irc: handle "override ip not set"
authorRudolf Polzer <divverent@xonotic.org>
Sun, 4 Dec 2011 15:48:22 +0000 (16:48 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 4 Dec 2011 15:48:22 +0000 (16:48 +0100)
server/rcon2irc/rcon2irc.pl

index 48d703fccfecc3f733c677666c2daffe9a28c774..ecc8d5aaa83e0c4a02a1158d55828aea338be0fe 100755 (executable)
@@ -766,8 +766,11 @@ our %config = (
 sub pickip($$)
 {
        my ($wan, $lan) = @_;
+       # $wan shall override $lan
+       return $lan
+               if not length $wan;
        return $wan
-               if $wan =~ /:\d+$/;
+               if $wan =~ /:\d+$/; # full override
        return $wan
                if $lan !~ /:(\d+)$/;
        return "$wan:$1";