mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-03 13:17:33 +02:00
Fix $nick and $arg being overridden by factoids
This commit is contained in:
parent
e5f5aa2c15
commit
98a061b232
@ -372,9 +372,9 @@ sub expand_factoid_vars {
|
|||||||
last if ++$depth >= 10;
|
last if ++$depth >= 10;
|
||||||
my $matches = 0;
|
my $matches = 0;
|
||||||
my $const_action = $action;
|
my $const_action = $action;
|
||||||
while ($const_action =~ /(?<!\\)\$([a-zA-Z0-9_:\-#]+)/g) {
|
while ($const_action =~ /(?<!\\)\$([a-zA-Z0-9_:\-#\[\]]+)/g) {
|
||||||
my $v = $1;
|
my $v = $1;
|
||||||
next if $v =~ m/^(nick|channel|randomnick|args|arg\[.+\])$/; # don't override special variables
|
next if $v =~ m/^(nick|channel|randomnick|args|arg\[.+\]):?$/i; # don't override special variables
|
||||||
|
|
||||||
$matches++;
|
$matches++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user