3
0
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:
Pragmatic Software 2017-11-23 14:12:43 -08:00
parent a7f298520d
commit 52d3cadef7

View File

@ -411,7 +411,7 @@ sub expand_factoid_vars {
last if ++$depth >= 100;
my ($a, $v) = ($1, $2);
$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 @exclude && grep { $v =~ m/^\Q$_\E$/i } @exclude;