From 943ea5670ed06378755f086d349bfa8b83a64a65 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 29 May 2021 13:57:11 -0700 Subject: [PATCH] Commands: Add `nop` command (disregards command) --- PBot/Commands.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PBot/Commands.pm b/PBot/Commands.pm index 47e54d93..d4346140 100644 --- a/PBot/Commands.pm +++ b/PBot/Commands.pm @@ -29,10 +29,17 @@ sub initialize { $self->register(sub { $self->cmd_help(@_) }, "help", 0); $self->register(sub { $self->cmd_uptime(@_) }, "uptime", 0); $self->register(sub { $self->cmd_in_channel(@_) }, "in", 0); + $self->register(sub { $self->cmd_nop(@_) }, "nop", 0); $self->{pbot}->{capabilities}->add('admin', 'can-in', 1); } +sub cmd_nop { + my ($self, $context) = @_; + $self->{pbot}->{logger}->log("Disregarding NOP command.\n"); + return ""; +} + sub cmd_set { my ($self, $context) = @_; my ($command, $key, $value) = $self->{pbot}->{interpreter}->split_args($context->{arglist}, 3);