From b53b0c7c7e3f7de7702ab143141223d6d10fb49f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 4 Dec 2011 16:48:22 +0100 Subject: [PATCH] pickip in rcon2irc: handle "override ip not set" --- server/rcon2irc/rcon2irc.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"; -- 2.39.2