pickip in rcon2irc: handle "override ip not set"

This commit is contained in:
Rudolf Polzer 2011-12-04 16:48:22 +01:00
parent 03fd9a1c7f
commit b53b0c7c7e

View File

@ -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";