Skip to content

Commit

Permalink
Only respond if there's a ':' or ',' immediately after the bot name
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Jul 30, 2016
1 parent 83b6e73 commit 4a6357a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Perl6IRCBotable.pm
Expand Up @@ -173,6 +173,7 @@ sub said {
my $body = $message->{body};

return unless $message->{address};
return unless $message->{raw_body} =~ /^\w+[,:]/;
return SOURCE if $body eq 'source';
return 'Sorry, it is too private here' if $message->{address} eq 'msg';

Expand Down

0 comments on commit 4a6357a

Please sign in to comment.