Permalink
Browse files

Allow registering monitor with IPv6 address

  • Loading branch information...
1 parent 840cdce commit 2e7a81e60faf3925831805a34a3d6d0d1f27fb4c @abh committed Jun 7, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 pool
View
7 pool
@@ -187,9 +187,10 @@ elsif ($cmd eq "addmonitor") {
my $user = find_user_by_email($email);
# do we have a hostname or an IP?
- my $ip;
- if (Net::IP::ip_is_ipv4($hostname)) {
- $ip = $hostname;
+ my $ip = Net::IP->new($hostname);
+
+ if ($ip) {
+ $ip = $ip->short;
$hostname = undef;
}
else {

0 comments on commit 2e7a81e

Please sign in to comment.