]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Statement.pl
*Fixup missing semicolon
[infobot.git] / src / Factoids / Statement.pl
index f689fc89cce5e183e9e7acc2df4a7c4b753628dd..6617dd649a692d42d16c8ad4688e4f3f73f351d8 100644 (file)
@@ -6,7 +6,7 @@
 ##  doStatement --
 ##
 ##     decide if $in is a statement, and if so,
-##             - update the dbm
+##             - update the db
 ##             - return feedback statement
 ##
 ##     otherwise return
@@ -56,7 +56,7 @@ sub doStatement {
        my($lhs, $mhs, $rhs) = ($`, $&, $');
 
        # allows factoid arguments to be updated. -lear.
-       $lhs =~ s/^(CMD: )?(.*)/$1||"" . lc $2/e;
+       $lhs =~ s/^(cmd: )?(.*)/$1||"" . lc $2/e;
 
        # discard article.
        $lhs =~ s/^(the|da|an?)\s+//i;
@@ -80,7 +80,9 @@ sub doStatement {
            return;
        }
 
-       return if (!$addressed and $lhs =~ /\s+/);
+       # uncomment to prevent HUNGRY learning of rhs with whitespace
+       #return if (!$addressed and $lhs =~ /\s+/);
+       &::DEBUG("doStatement: $in:$lhs:$mhs:$rhs");
 
        &status("statement: <$who> $message");
 
@@ -92,7 +94,7 @@ sub doStatement {
 
        # verify the update statement whether there are any weird
        # characters.
-       ### this chan be simplified.
+       ### this can be simplified.
        foreach (split //, $lhs.$rhs) {
            my $ord = ord $_;
            if ($ord > 170 and $ord < 220) {