3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 12:29:27 +01:00

Add silent parameter to prevent logging of ignored messages

This commit is contained in:
Pragmatic Software 2016-02-25 00:45:03 -08:00
parent d344e6d667
commit 99e505b811

View File

@ -131,7 +131,7 @@ sub save_ignores {
sub check_ignore {
my $self = shift;
my ($nick, $user, $host, $channel) = @_;
my ($nick, $user, $host, $channel, $silent) = @_;
my $pbot = $self->{pbot};
$channel = lc $channel;
@ -175,7 +175,7 @@ sub check_ignore {
$ignored_escaped =~ s/\\(\.|\*)/$1/g;
if(($channel =~ /$ignored_channel_escaped/i) && ($hostmask =~ /$ignored_escaped/i)) {
$self->{pbot}->{logger}->log("$nick!$user\@$host message ignored in channel $channel (matches [$ignored] host and [$ignored_channel] channel)\n");
$self->{pbot}->{logger}->log("$nick!$user\@$host message ignored in channel $channel (matches [$ignored] host and [$ignored_channel] channel)\n") unless $silent;
return 1;
}
}