From 1b1312347487db6b5fb88abd3885eba24bb1a069 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 13 Aug 2021 14:20:56 -0700 Subject: [PATCH] updates: remove `background-process` from `recall` command metadata --- lib/PBot/VERSION.pm | 4 ++-- updates/4353_fix_recall.pl | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 updates/4353_fix_recall.pl diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index aee49e50..bfac7a78 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 => 4352, - BUILD_DATE => "2021-08-12", + BUILD_REVISION => 4353, + BUILD_DATE => "2021-08-13", }; sub initialize {} diff --git a/updates/4353_fix_recall.pl b/updates/4353_fix_recall.pl new file mode 100755 index 00000000..a8d51eec --- /dev/null +++ b/updates/4353_fix_recall.pl @@ -0,0 +1,27 @@ +#!/usr/bin/env perl + +# Remove `background-process` metadata from `recall` command. + +use warnings; use strict; + +BEGIN { + use File::Basename; + my $location = -l __FILE__ ? dirname readlink __FILE__ : dirname __FILE__; + unshift @INC, $location; +} + +use lib3512::HashObject; +use lib3503::PBot; + +my ($data_dir, $version, $last_update) = @ARGV; + +print "Updating recall command; version: $version, last_update: $last_update, data_dir: $data_dir\n"; + +my $pbot = lib3503::PBot->new(); + +my $commands = lib3512::HashObject->new(name => 'Command metadata', filename => "$data_dir/commands", pbot => $pbot); +$commands->load; + +$commands->unset('recall', 'background-process'); + +exit 0;