mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
recall now skips nick-prefix and botnick-postfix messages
This commit is contained in:
parent
534523287b
commit
50c5c15fbd
@ -1052,7 +1052,7 @@ sub recall_message_by_text {
|
|||||||
my $bot_trigger = $self->{pbot}->{registry}->get_value('general', 'trigger');
|
my $bot_trigger = $self->{pbot}->{registry}->get_value('general', 'trigger');
|
||||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||||
foreach my $message (@$messages) {
|
foreach my $message (@$messages) {
|
||||||
next if $message->{msg} =~ m/^$botnick.? $ignore_command/ or $message->{msg} =~ m/^$bot_trigger$ignore_command/;
|
next if $message->{msg} =~ m/^$botnick.? $ignore_command/i or $message->{msg} =~ m/^(?:\s*[^,:\(\)\+\*\/ ]+[,:]?\s+)?$bot_trigger$ignore_command/i or $message->{msg} =~ m/^\s*$ignore_command.? $botnick$/i;
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
return undef;
|
return undef;
|
||||||
|
Loading…
Reference in New Issue
Block a user