From 534626943a0a5e251e5465376f3de3fb71b25e91 Mon Sep 17 00:00:00 2001 From: Darkelarious Date: Wed, 11 Feb 2015 21:12:44 +0100 Subject: ability to query UCC applets (Pg only) --- lib/MasterServer/Core/Util.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/MasterServer/Core/Util.pm') 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) = @_; -- cgit v1.2.3