mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Exclude "Why would I want to do that to myself?" from specific commands
This commit is contained in:
parent
428268a415
commit
2ac7b6feb6
@ -204,13 +204,12 @@ sub interpret {
|
|||||||
|
|
||||||
$tonick = $nick if defined $tonick and $tonick eq 'me';
|
$tonick = $nick if defined $tonick and $tonick eq 'me';
|
||||||
|
|
||||||
if ($keyword !~ /^(factadd|add|factfind|find|factshow|show|forget|factdel|factset|factchange|change|msg|tell|cc|eval|u|udict|ud|actiontrigger|urban|perl)/) {
|
if ($keyword !~ /^(factrem|forget|factdel|factadd|add|factfind|find|factshow|show|forget|factdel|factset|factchange|change|msg|tell|cc|eval|u|udict|ud|actiontrigger|urban|perl)/) {
|
||||||
$keyword =~ s/(\w+)([?!.]+)$/$1/;
|
$keyword =~ s/(\w+)([?!.]+)$/$1/;
|
||||||
$arguments =~ s/(?<![\w\/\-\\])me\b/$nick/gi if defined $arguments && $depth <= 2;
|
$arguments =~ s/(?<![\w\/\-\\])me\b/$nick/gi if defined $arguments && $depth <= 2;
|
||||||
$arguments =~ s/(?<![\w\/\-\\])my\b/${nick}'s/gi if defined $arguments && $depth <= 2;
|
$arguments =~ s/(?<![\w\/\-\\])my\b/${nick}'s/gi if defined $arguments && $depth <= 2;
|
||||||
$arguments =~ s/\\my\b/my/gi if defined $arguments && $depth <= 2;
|
$arguments =~ s/\\my\b/my/gi if defined $arguments && $depth <= 2;
|
||||||
$arguments =~ s/\\me\b/me/gi if defined $arguments && $depth <= 2;
|
$arguments =~ s/\\me\b/me/gi if defined $arguments && $depth <= 2;
|
||||||
}
|
|
||||||
|
|
||||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||||
|
|
||||||
@ -225,6 +224,7 @@ sub interpret {
|
|||||||
$self->{pbot}->{logger}->log("Final result ($delay delay) [$message->{message}]\n");
|
$self->{pbot}->{logger}->log("Final result ($delay delay) [$message->{message}]\n");
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(not defined $keyword) {
|
if(not defined $keyword) {
|
||||||
$pbot->{logger}->log("Error 2, no keyword\n");
|
$pbot->{logger}->log("Error 2, no keyword\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user