From 6d552cc710015ea2ad23f7c6105c8ee92b363112 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 26 Aug 2017 01:50:42 -0700 Subject: [PATCH] Double-quoted $0 in code-factoids now expand to root-keyword --- PBot/Factoids.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 17259911..fa480cc5 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -639,6 +639,7 @@ sub interpreter { my @names = map { $_->symbol =~ /^[\%\@\$]+(.*)/; $1 } @$vars if $vars; $code = $self->expand_factoid_vars($from, $code, @names); + $code =~ s/"\$0"/$root_keyword/g; my %signals = %SIG; alarm 0;