Skip to content

Commit

Permalink
If the user says "help", don't add that as a ban comment.
Browse files Browse the repository at this point in the history
This should fix issue freenode#16.
  • Loading branch information
bigpresh committed Apr 4, 2017
1 parent 2bb1595 commit e05fbb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/bantracker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,16 @@ sub cmd_btcomment {
our %heap;
my ($message) = @_;
my $source=$message->source();
my @args = @{$message->args};

# bail out if we've been called by the PRIVMSG hook and the destination is a channel
return if $source->{'type'} & Eir::Source::RawIrc && substr($source->{destination},0,1) eq '#';

# If the user is using the "help" command, don't treat that as a ban comment
return if lc($args[0]) eq 'help';

my $sender=irclc($source->{'raw'});
my $nick=$source->{'name'};
my @args = @{$message->args};
if ($source->{'type'} & Eir::Source::RawIrc) {
@args=split /\s+/,$args[0];
}
Expand Down

0 comments on commit e05fbb3

Please sign in to comment.