3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

Commands: Add nop command (disregards command)

This commit is contained in:
Pragmatic Software 2021-05-29 13:57:11 -07:00
parent 6b8d96a9ea
commit 943ea5670e

View File

@ -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);