X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=src%2FFactoids%2FStatement.pl;h=6617dd649a692d42d16c8ad4688e4f3f73f351d8;hb=5886daaa4051238458f2950a9ad93779e71f0d4f;hp=b02a4daf1bf4412c2de24009bc237a7797863c26;hpb=b28802c40e8775f2a9457b833e2014ccc2f4161c;p=infobot.git diff --git a/src/Factoids/Statement.pl b/src/Factoids/Statement.pl index b02a4da..6617dd6 100644 --- a/src/Factoids/Statement.pl +++ b/src/Factoids/Statement.pl @@ -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) {