From 250609cfa6bd2cb43122c67ff8fbb8802ccc61f6 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Thu, 21 May 2020 17:30:23 +0100 Subject: [PATCH] add missing saveuserfile and expm spawn_cmd cmds --- cmd/saveuserfile.pl | 13 +++++++++++++ cmd/spawncmd.pl | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cmd/saveuserfile.pl create mode 100644 cmd/spawncmd.pl diff --git a/cmd/saveuserfile.pl b/cmd/saveuserfile.pl new file mode 100644 index 00000000..845da6ad --- /dev/null +++ b/cmd/saveuserfile.pl @@ -0,0 +1,13 @@ +# +# the export the user file to ascii command +# +# +# +my $self = shift; +return (1, $self->msg('e5')) unless $self->priv >= 9; + +my $count = DXUser::writeoutjson(); # for now + +return (1, "DXUser::writeoutjson - $count lines written"); + + diff --git a/cmd/spawncmd.pl b/cmd/spawncmd.pl new file mode 100644 index 00000000..829c5295 --- /dev/null +++ b/cmd/spawncmd.pl @@ -0,0 +1,13 @@ +# spawn a command +# +# Note: this command will run _nospawn versions of a cmd (as this is a direct lift from +# the 'spawn_cmd' in DXCron pm +# + +sub handle +{ + my ($self, $line) = @_; + return (1, $self->msg('e5')) if $self->priv < 6; + my @out = DXCron::spawn_cmd($line, $self) unless $self->{_nospawn}; + return (1, @out); +} -- 2.43.0