X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FFactoids%2FStatement.pl;h=ae0ffa4b6f78292d88c7d1909f08b75aab289212;hb=4529d37efa27f5443d9ee31beb5d1ab50c264876;hp=903a4f857d717380efdb031e136940012e54f808;hpb=84a40e626e1568d056200b47a6f7dae44111b7c8;p=infobot.git diff --git a/src/Factoids/Statement.pl b/src/Factoids/Statement.pl index 903a4f8..ae0ffa4 100644 --- a/src/Factoids/Statement.pl +++ b/src/Factoids/Statement.pl @@ -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";