]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Misc.pl
added _default to chan mask.
[infobot.git] / src / Misc.pl
index 22cd0ea571df8f3d9379fad3662d273e10d783dc..76dc9b75038fc8e5bf1b4c92357caea6134bcf60 100644 (file)
@@ -249,6 +249,11 @@ sub fixPlural {
        return;
     }
 
+    if (!defined $int or $int =~ /^\D+$/) {
+       &WARN("fixPlural: int != defined or int");
+       return $str;
+    }
+
     if ($str eq "has") {
        $str = "have"   if ($int > 1);
     } elsif ($str eq "is") {
@@ -611,10 +616,10 @@ sub hasProfanity {
 sub hasParam {
     my ($param) = @_;
 
-    ### TODO: specific reason why it failed.
     if (&IsChanConf($param)) {
        return 1;
     } else {
+       ### TODO: specific reason why it failed.
        &msg($who, "unfortunately, \002$param\002 is disabled in my configuration") unless ($addrchar);
        return 0;
     }