]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Process.pl
* Updated FAQ with some hopefully helpful starter tips for fact packs
[infobot.git] / src / Process.pl
index 824651d2e426b0490b993bb2c9a756c5282b7ab7..21c2a69b88def607c7873a32766c52ed7d5a9de8 100644 (file)
@@ -26,8 +26,9 @@ sub process {
     $learnok = 1 if ($addressed);
     if ( $param{'learn'} =~ /^HUNGRY$/i ) {
         $learnok  = 1;
-        $addrchar = 1;
-        $talkok   = 1;
+        #FIXME: why can we talk if we just want to learn?
+        #$addrchar = 1;
+        #$talkok   = 1;
     }
 
     &shmFlush();                     # hack.
@@ -274,7 +275,7 @@ sub process {
     }
 
     # greetings.
-    if ( $message =~ /how (the hell )?are (ya|you)( doin\'?g?)?\?*$/ ) {
+    if ( $message =~ /how (the hell )?are (ya|you)( doin\'?g?)?\?*$/ && $talkok ) {
 
         &performReply( &getRandom( keys %{ $lang{'howareyou'} } ) );
         return;