diff --git a/data/factoids.sqlite3 b/data/factoids.sqlite3 index fc3f44c7..e0eb35ea 100644 Binary files a/data/factoids.sqlite3 and b/data/factoids.sqlite3 differ diff --git a/lib/PBot/Core/Applets.pm b/lib/PBot/Core/Applets.pm index dde1ae65..789e9b3f 100644 --- a/lib/PBot/Core/Applets.pm +++ b/lib/PBot/Core/Applets.pm @@ -82,7 +82,11 @@ sub launch_applet { $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; diff --git a/lib/PBot/Core/Factoids/Data.pm b/lib/PBot/Core/Factoids/Data.pm index 354e75d7..4df4e9ca 100644 --- a/lib/PBot/Core/Factoids/Data.pm +++ b/lib/PBot/Core/Factoids/Data.pm @@ -27,6 +27,7 @@ our %factoid_metadata = ( 'enabled' => 'INTEGER', 'help' => 'TEXT', 'interpolate' => 'INTEGER', + 'keep-quotes' => 'INTEGER', 'keyword_override' => 'TEXT', 'last_referenced_in' => 'TEXT', 'last_referenced_on' => 'NUMERIC', diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 769c3119..10a92c2c 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4545, - BUILD_DATE => "2022-06-26", + BUILD_REVISION => 4546, + BUILD_DATE => "2022-06-27", }; sub initialize {} diff --git a/updates/4546_restart_required.pl b/updates/4546_restart_required.pl new file mode 100755 index 00000000..c5734d30 --- /dev/null +++ b/updates/4546_restart_required.pl @@ -0,0 +1,7 @@ +#!/usr/bin/env perl + +# Recent updates require a bot restart +# +# Added 'keep-quotes' factoid metadata. + +exit 0;