3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Replace "me" in factoid arguments only during first interpretation pass

This commit is contained in:
Pragmatic Software 2015-09-10 01:51:24 -07:00
parent d8183fc405
commit 70f091545b

View File

@ -190,7 +190,7 @@ sub interpret {
and $keyword ne "change"
and $keyword ne "msg") {
$keyword =~ s/(\w+)([?!.]+)$/$1/;
$arguments =~ s/(?<![\w\/\-])me\b/$nick/gi if defined $arguments;
$arguments =~ s/(?<![\w\/\-])me\b/$nick/gi if defined $arguments && $depth <= 2;
}
if(defined $arguments && $arguments =~ m/^(your|him|her|its|it|them|their)(self|selves)$/i) {