]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - server/rcon2irc/rcon2irc.pl
pickip in rcon2irc: handle "override ip not set"
[xonotic/xonotic.git] / 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";