]> git.donarmstrong.com Git - infobot.git/commitdiff
enable factoids with whitespace if HUNGRY
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 2 Mar 2005 03:18:04 +0000 (03:18 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 2 Mar 2005 03:18:04 +0000 (03:18 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1207 c11ca15a-4712-0410-83d8-924469b57eb5

files/sample/blootbot.config
src/Factoids/Statement.pl

index 87a1ff18e158569d3e69457b7e73e1f5ba69b6ca..246ed2ed46c76c53201ba8f37a345755b7aad7fa 100644 (file)
@@ -93,10 +93,7 @@ set maxDataSize              450
 # [str] when should the bot bother learning new factoids.
 #   ADDRESSED  -- only learn when addressed.
 #   HUNGRY     -- learn irrelevent of addressing. this will catch
-#                 _everything_, use at your own risk. I tried this ages
-#                 ago and it caught quite funny responses but who knows
-#                 if my modifications will prevent this or not, perhaps
-#                 IsInvalid must be disabled?
+#                 _everything_, use at your own risk.
 set learn              ADDRESSED
 
 # [str] different behaviour with URLs.
index b02a4daf1bf4412c2de24009bc237a7797863c26..d2c29fe2b067f4f92c098f9501a7c454a58ee6a1 100644 (file)
@@ -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) {