mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Factoids: expand_factoid_vars(): special-case Perl's $a and $b, etc
This commit is contained in:
parent
85d887ff5c
commit
b3ca5e69cd
@ -765,8 +765,8 @@ sub expand_factoid_vars {
|
||||
$extract_method = 'regex';
|
||||
}
|
||||
|
||||
if ($var =~ /^(?:_.*|nick|channel|randomnick|arglen|args|arg\[.+\])$/i) {
|
||||
# skip identifiers with leading underscore and special variables
|
||||
if ($var =~ /^(?:_.*|\d+|a|b|nick|channel|randomnick|arglen|args|arg\[.+\])$/i) {
|
||||
# skip identifiers with leading underscores, etc
|
||||
$result .= $extract_method eq 'bracket' ? '${' . $var . '}' : '$' . $var;
|
||||
next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user