summaryrefslogtreecommitdiffstats
path: root/modules/util.pl
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2013-10-23 17:40:15 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2013-10-23 17:40:15 +0000
commitbbb625fbd7ee5ebb2e3e2564b3c7117f08200e7d (patch)
tree8ab67260025801c3d6fec83b30b61e8ae8332337 /modules/util.pl
parent5239387031d9426a2001187789d4ae6a87dbd966 (diff)
all sorts of stuff changed. This is just one big code package update
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) {