]> git.donarmstrong.com Git - infobot.git/commitdiff
- added user flag +a for asking factoids...
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 3 Nov 2002 14:20:05 +0000 (14:20 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 3 Nov 2002 14:20:05 +0000 (14:20 +0000)
  I'm surprised this does not even exist in infobot... weird.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@597 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Question.pl

index 2c1a6e5c5dc5232b6b6dca25109ec2b014d7bf85..347e5d6ba4aaf8c0ec70b748474ec09739f6cc45 100644 (file)
@@ -38,6 +38,13 @@ sub doQuestion {
     } else {
        ### TODO: this should be caught in Process.pl?
        return '' unless ($talkok);
+
+       # there is no flag to disable/enable asking factoids...
+       # so it was added... thanks zyxep! :)
+       if (&IsFlag("a") ne "a") {
+           &status("$who tried to ask us when not allowed.");
+           return;
+       }
     }
 
     # dangerous; common preambles should be stripped before here