From: Rudolf Polzer Date: Sun, 4 Dec 2011 15:48:22 +0000 (+0100) Subject: pickip in rcon2irc: handle "override ip not set" X-Git-Tag: xonotic-v0.6.0~45 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b53b0c7c7e3f7de7702ab143141223d6d10fb49f;p=xonotic%2Fxonotic.git pickip in rcon2irc: handle "override ip not set" --- diff --git a/server/rcon2irc/rcon2irc.pl b/server/rcon2irc/rcon2irc.pl index 48d703fc..ecc8d5aa 100755 --- a/server/rcon2irc/rcon2irc.pl +++ b/server/rcon2irc/rcon2irc.pl @@ -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";