From 52d3cadef74a8cbdfad5102d4d861f67b5fe443b Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 23 Nov 2017 14:12:43 -0800 Subject: [PATCH] Improve factoid variable expansion --- PBot/Factoids.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 2b700abe..3cf14a98 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -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;