]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Misc.pl
- IsHostMatch: check for NULL.
[infobot.git] / src / Misc.pl
index 5e9bf14579e37cca3dbe4e7ead99a0ad1c823c4e..9379d7b10dae4e2fda048cfd3e6d580d213a63fc 100644 (file)
@@ -416,7 +416,10 @@ sub IsHostMatch {
        $local{'host'} = &makeHostMask(lc $3);
     }
 
-    if ($thisnuh =~ /^(\S+)!(\S+)@(\S+)/) {
+    if (!defined $thisnuh) {
+       &WARN("IHM: thisnuh == NULL.");
+       return 0;
+    } elsif ($thisnuh =~ /^(\S+)!(\S+)@(\S+)/) {
        $this{'nick'} = lc $1;
        $this{'user'} = lc $2;
        $this{'host'} = &makeHostMask(lc $3);