3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-27 06:19:25 +01:00

Do not override special variables in expand_factoid_vars()

This commit is contained in:
Pragmatic Software 2015-07-09 23:24:00 -07:00
parent 875780b50b
commit 241c30b4f4

View File

@ -335,7 +335,7 @@ sub expand_factoid_vars {
while ($action =~ /(?<!\\)\$([a-zA-Z0-9_\-]+)/g) {
my $v = $1;
next if $v =~ m/^[0-9]+$/;
next if $v =~ m/^(nick|channel|randomnick)$/; # don't override special variables
my ($var_chan, $var) = $self->find_factoid($from, $v, undef, 0, 1);
if(defined $var && $self->{factoids}->hash->{$var_chan}->{$var}->{type} eq 'text') {