mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Don't remove dollar-sign from unexpanded factoid vars
This commit is contained in:
parent
ed63fb3766
commit
1179a7e1f1
@ -348,8 +348,6 @@ sub expand_factoid_vars {
|
|||||||
my $line = int(rand($#mylist + 1));
|
my $line = int(rand($#mylist + 1));
|
||||||
$mylist[$line] =~ s/"//g;
|
$mylist[$line] =~ s/"//g;
|
||||||
$action =~ s/\$$var/$mylist[$line]/;
|
$action =~ s/\$$var/$mylist[$line]/;
|
||||||
} else {
|
|
||||||
$action =~ s/(?<!\\)\$$var/$var/;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,7 +580,7 @@ sub interpreter {
|
|||||||
if($action =~ /^\/call\s+(.*)$/) {
|
if($action =~ /^\/call\s+(.*)$/) {
|
||||||
my $command = $self->expand_factoid_vars($from, $1);
|
my $command = $self->expand_factoid_vars($from, $1);
|
||||||
if(length $arguments) {
|
if(length $arguments) {
|
||||||
$command = "$command $arguments";
|
$command .= " $arguments";
|
||||||
}
|
}
|
||||||
|
|
||||||
$pbot->{logger}->log("[" . (defined $from ? $from : "stdin") . "] ($nick!$user\@$host) [$keyword] aliased to: [$command]\n");
|
$pbot->{logger}->log("[" . (defined $from ? $from : "stdin") . "] ($nick!$user\@$host) [$keyword] aliased to: [$command]\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user