3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 03:49:29 +01:00

Factoids: add keep-quotes metadata for applet commands

This commit is contained in:
Pragmatic Software 2022-06-27 19:52:38 -07:00
parent 780d41e628
commit 41b69bdfa5
5 changed files with 15 additions and 3 deletions

BIN
data/factoids.sqlite3 vendored

Binary file not shown.

View File

@ -82,7 +82,11 @@ sub launch_applet {
$args = encode('UTF-8', $args); $args = encode('UTF-8', $args);
} }
my @cmdline = ("./$applet", $self->{pbot}->{interpreter}->split_line($args)); my $strip_quotes = 1;
$strip_quotes = 0 if $self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $trigger, 'keep-quotes');
my @cmdline = ("./$applet", $self->{pbot}->{interpreter}->split_line($args, strip_quotes => $strip_quotes));
my $timeout = $self->{pbot}->{registry}->get_value('general', 'applet_timeout') // 30; my $timeout = $self->{pbot}->{registry}->get_value('general', 'applet_timeout') // 30;

View File

@ -27,6 +27,7 @@ our %factoid_metadata = (
'enabled' => 'INTEGER', 'enabled' => 'INTEGER',
'help' => 'TEXT', 'help' => 'TEXT',
'interpolate' => 'INTEGER', 'interpolate' => 'INTEGER',
'keep-quotes' => 'INTEGER',
'keyword_override' => 'TEXT', 'keyword_override' => 'TEXT',
'last_referenced_in' => 'TEXT', 'last_referenced_in' => 'TEXT',
'last_referenced_on' => 'NUMERIC', 'last_referenced_on' => 'NUMERIC',

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4545, BUILD_REVISION => 4546,
BUILD_DATE => "2022-06-26", BUILD_DATE => "2022-06-27",
}; };
sub initialize {} sub initialize {}

View File

@ -0,0 +1,7 @@
#!/usr/bin/env perl
# Recent updates require a bot restart
#
# Added 'keep-quotes' factoid metadata.
exit 0;