mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
Factoids: preserve_whitespace
now works for all factoids
This commit is contained in:
parent
ebb209549a
commit
48373719d8
@ -426,15 +426,17 @@ sub handle_action {
|
||||
}
|
||||
}
|
||||
|
||||
my $preserve_whitespace = $self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $keyword, 'preserve_whitespace');
|
||||
|
||||
if (defined $preserve_whitespace) {
|
||||
$context->{preserve_whitespace} = $preserve_whitespace;
|
||||
}
|
||||
|
||||
return $action if $context->{special} eq 'code-factoid';
|
||||
|
||||
if ($self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $keyword, 'type') eq 'module') {
|
||||
my $preserve_whitespace = $self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $keyword, 'preserve_whitespace');
|
||||
$preserve_whitespace = 0 if not defined $preserve_whitespace;
|
||||
|
||||
$context->{preserve_whitespace} = $preserve_whitespace;
|
||||
$context->{root_keyword} = $keyword unless defined $context->{root_keyword};
|
||||
$context->{root_channel} = $channel;
|
||||
$context->{root_keyword} = $keyword unless defined $context->{root_keyword};
|
||||
$context->{root_channel} = $channel;
|
||||
|
||||
my $result = $self->{pbot}->{modules}->execute_module($context);
|
||||
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4361,
|
||||
BUILD_REVISION => 4362,
|
||||
BUILD_DATE => "2021-08-23",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user