mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 19:52:34 +01:00
Factoids: minor whitespace reformatting
This commit is contained in:
parent
141230b78b
commit
158b13006c
@ -792,8 +792,11 @@ sub execute_code_factoid_using_vm {
|
|||||||
unless ($self->{factoids}->exists($context->{channel}, $context->{keyword}, 'interpolate')
|
unless ($self->{factoids}->exists($context->{channel}, $context->{keyword}, 'interpolate')
|
||||||
and $self->{factoids}->get_data($context->{channel}, $context->{keyword}, 'interpolate') eq '0')
|
and $self->{factoids}->get_data($context->{channel}, $context->{keyword}, 'interpolate') eq '0')
|
||||||
{
|
{
|
||||||
if ($context->{code} =~ m/(?:\$\{?nick\b|\$\{?args\b|\$\{?arg\[)/ and length $context->{arguments}) { $context->{no_nickoverride} = 1; }
|
if ($context->{code} =~ m/(?:\$\{?nick\b|\$\{?args\b|\$\{?arg\[)/ and length $context->{arguments}) {
|
||||||
else { $context->{no_nickoverride} = 0; }
|
$context->{no_nickoverride} = 1;
|
||||||
|
} else {
|
||||||
|
$context->{no_nickoverride} = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$context->{action} = $context->{code};
|
$context->{action} = $context->{code};
|
||||||
$context->{code} = $self->expand_factoid_vars($context);
|
$context->{code} = $self->expand_factoid_vars($context);
|
||||||
@ -1080,8 +1083,11 @@ sub handle_action {
|
|||||||
$action =~ s/(?<!\\)\$0|(?<!\\)\$\{0\}/$trigger_name/g;
|
$action =~ s/(?<!\\)\$0|(?<!\\)\$\{0\}/$trigger_name/g;
|
||||||
$context->{alldone} = 1;
|
$context->{alldone} = 1;
|
||||||
} else {
|
} else {
|
||||||
if ($self->{factoids}->get_data($channel, $keyword, 'allow_empty_args')) { $action = $self->expand_action_arguments($action, undef, ''); }
|
if ($self->{factoids}->get_data($channel, $keyword, 'allow_empty_args')) {
|
||||||
else { $action = $self->expand_action_arguments($action, undef, $context->{nick}); }
|
$action = $self->expand_action_arguments($action, undef, '');
|
||||||
|
} else {
|
||||||
|
$action = $self->expand_action_arguments($action, undef, $context->{nick});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$context->{no_nickoverride} = 0;
|
$context->{no_nickoverride} = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user