3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Remove extraneous $1

This commit is contained in:
Pragmatic Software 2017-08-27 19:54:46 -07:00
parent 07eef4b9a2
commit a6e495352f

View File

@ -379,7 +379,7 @@ sub expand_factoid_vars {
while (1) {
last if ++$depth >= 10;
my $matches = 0;
$action =~ s/\$0/\$$root_keyword$1/g;
$action =~ s/\$0/\$$root_keyword/g;
my $const_action = $action;
while ($const_action =~ /(\ba\s*|\ban\s*)?(?<!\\)\$([a-zA-Z0-9_:\-#\[\]]+)/gi) {
my ($a, $v) = ($1, $2);