Respond to !forget, even if unaddressed
[poe-component-irc-plugin-infobot.git] / lib / POE / Component / IRC / Plugin / Infobot.pm
index bd8d83d6009923cfdf8679bc5e239ebb2795aac1..c2969b63b321d00dda1ddc6235f2bae2f444390a 100644 (file)
@@ -86,8 +86,8 @@ sub runcmd{
                infobot_add $self, $irc, $1, $2, $to, $nick if $addressed
        } elsif (/^(.+)\?$/) {
                infobot_query $self, $irc, $1, $to, $nick, $addressed
-       } elsif (/^forget\s+(.*)$/) {
-               infobot_forget $self, $irc, $1, $to, $nick if $addressed
+       } elsif ($addressed && /^!?forget\s+(.*)$/ || /^!forget\s+(.*)$/) {
+               infobot_forget $self, $irc, $1, $to, $nick
        }
 }
 
This page took 0.009743 seconds and 4 git commands to generate.