mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Fix recall from /msg not ignoring the command itself
This commit is contained in:
parent
a3df01bae3
commit
01f543b3b7
@ -627,7 +627,7 @@ sub recall_message_by_count {
|
||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||
my $bot_trigger = $self->{pbot}->{registry}->get_value('general', 'trigger');
|
||||
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/ or $message->{msg} =~ m/^$bot_trigger$ignore_command/;
|
||||
return $message;
|
||||
}
|
||||
return undef;
|
||||
@ -671,7 +671,7 @@ sub recall_message_by_text {
|
||||
my $bot_trigger = $self->{pbot}->{registry}->get_value('general', 'trigger');
|
||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||
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/ or $message->{msg} =~ m/^$bot_trigger$ignore_command/;
|
||||
return $message;
|
||||
}
|
||||
return undef;
|
||||
|
Loading…
Reference in New Issue
Block a user