]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Statement.pl
"~forget blah" now works. thanks to ElectricElf
[infobot.git] / src / Factoids / Statement.pl
index 903a4f857d717380efdb031e136940012e54f808..ae0ffa4b6f78292d88c7d1909f08b75aab289212 100644 (file)
@@ -65,14 +65,14 @@ sub doStatement {
 
        # break if either lhs or rhs is NULL.
        if ($lhs eq "" or $rhs eq "") {
-           return;
+           return "NOT-A-STATEMENT";
        }
 
        # lets check if it failed.
        if (&validFactoid($lhs,$rhs) == 0) {
            if ($addressed) {
                &status("IGNORE statement: <$who> $message");
-               &performReply( &getRandom(keys %{$lang{'confused'}}) );
+               &performReply( &getRandom(keys %{ $lang{'confused'} }) );
            }
            return;
        }
@@ -99,9 +99,8 @@ sub doStatement {
            }
        }
 
-       if (&update($lhs, $mhs, $rhs)) {
-           return;     # success.
-       }
+       # success.
+       return if (&update($lhs, $mhs, $rhs));
     }
 
     return "CONTINUE";