3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Don't remove dollar-sign from unexpanded factoid vars

This commit is contained in:
Pragmatic Software 2015-07-06 20:01:17 -07:00
parent ed63fb3766
commit 1179a7e1f1

View File

@ -348,8 +348,6 @@ sub expand_factoid_vars {
my $line = int(rand($#mylist + 1));
$mylist[$line] =~ s/"//g;
$action =~ s/\$$var/$mylist[$line]/;
} else {
$action =~ s/(?<!\\)\$$var/$var/;
}
}
@ -582,7 +580,7 @@ sub interpreter {
if($action =~ /^\/call\s+(.*)$/) {
my $command = $self->expand_factoid_vars($from, $1);
if(length $arguments) {
$command = "$command $arguments";
$command .= " $arguments";
}
$pbot->{logger}->log("[" . (defined $from ? $from : "stdin") . "] ($nick!$user\@$host) [$keyword] aliased to: [$command]\n");