summaryrefslogtreecommitdiffstats
path: root/modules/util.pl
diff options
context:
space:
mode:
Diffstat (limited to 'modules/util.pl')
-rw-r--r--modules/util.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/util.pl b/modules/util.pl
index 9a104c1..35a66ae 100644
--- a/modules/util.pl
+++ b/modules/util.pl
@@ -179,9 +179,8 @@ sub dprint {
if ($::debugx{$type} eq 0) {
return;
}
- print STDERR strftime("%F %T ", gmtime);
- print STDERR GREEN, 'DEBUG', RESET, '(', $::debugx{$type}, $type, RESET, ') ';
- print STDERR $text, "\n";
+ say STDERR strftime("%F %T ", gmtime),
+ GREEN, 'DEBUG', RESET, '(', $::debugx{$type}, $type, RESET, ') ', $text;
}
@@ -207,7 +206,7 @@ sub getHostIP
{
my ($module, $host) = @_;
if ( ($host =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) or
- ($host =~ /^gateway\/web\/freenode\/ip\.(\d+)\.(\d+)\.(\d+)\.(\d+)$/) ) {
+ ($host =~ /^gateway\/web\/.*\/ip\.(\d+)\.(\d+)\.(\d+)\.(\d+)$/) ) {
#yay, easy IP!
return dottedQuadToInt(undef, "$1.$2.$3.$4");
} elsif (index($host, '/') != -1) {