mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Improve factoid variable expansion
This commit is contained in:
parent
a7f298520d
commit
52d3cadef7
@ -411,7 +411,7 @@ sub expand_factoid_vars {
|
|||||||
last if ++$depth >= 100;
|
last if ++$depth >= 100;
|
||||||
my ($a, $v) = ($1, $2);
|
my ($a, $v) = ($1, $2);
|
||||||
$v =~ s/(.):$/$1/;
|
$v =~ s/(.):$/$1/;
|
||||||
next if $v =~ m/^_/; # underscore-prefixed vars reserved for code-factoids
|
next if $v =~ m/^[\W]/; # special character prefix skipped for shell/code-factoids/etc
|
||||||
next if $v =~ m/^(nick|channel|randomnick|arglen|args|arg\[.+\]|[_0])$/i; # don't override special variables
|
next if $v =~ m/^(nick|channel|randomnick|arglen|args|arg\[.+\]|[_0])$/i; # don't override special variables
|
||||||
next if @exclude && grep { $v =~ m/^\Q$_\E$/i } @exclude;
|
next if @exclude && grep { $v =~ m/^\Q$_\E$/i } @exclude;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user