diff options
Diffstat (limited to 'lib/MasterServer/Core/Util.pm')
| -rwxr-xr-x | lib/MasterServer/Core/Util.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/MasterServer/Core/Util.pm b/lib/MasterServer/Core/Util.pm index 001137d..eb4d509 100755 --- a/lib/MasterServer/Core/Util.pm +++ b/lib/MasterServer/Core/Util.pm @@ -9,15 +9,19 @@ use Exporter 'import'; our @EXPORT = qw| valid_address ip2country |; +################################################################################ ## return the abbreviated country based on IP +################################################################################ sub ip2country { my ($self, $ip) = @_; my $reg = IP::Country::Fast->new(); return $reg->inet_atocc($ip); } +################################################################################ ## Verify whether a given domain name or IP address and port are valid. -## returns true/false if valid ip + port +## returns 1/0 if valid/invalid ip + port +################################################################################ sub valid_address { my ($self, $a, $p) = @_; |
