aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-09-03 15:20:36 +1200
committerDavid Phillips <david@sighup.nz>2018-09-03 15:20:36 +1200
commit14c1d55b97d61de7eb48acd4a5b745e2ba5e977a (patch)
treed88ccb10dc9a51ce0f7d7353c9681e213536a410
parent113fea32d59571edbca17747a5ce9984d10b48ac (diff)
downloadidalius-14c1d55b97d61de7eb48acd4a5b745e2ba5e977a.tar.xz
Add exit command
-rw-r--r--Plugin/Admin.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Plugin/Admin.pm b/Plugin/Admin.pm
index 437cf07..ceaa984 100644
--- a/Plugin/Admin.pm
+++ b/Plugin/Admin.pm
@@ -25,6 +25,7 @@ sub configure {
$cmdref->("ignore", sub { $self->ignore(@_); } );
$cmdref->("don't ignore", sub { $self->do_not_ignore(@_); } );
$cmdref->("who are you ignoring?", sub { $self->dump_ignore(@_); } );
+ $cmdref->("exit", sub { $self->exit(@_); } );
return $self;
}
@@ -177,5 +178,12 @@ sub dump_ignore {
return "I am ignoring: " . join ", ", @{$config{ignore}};
}
+sub exit {
+ my ($self, $irc, $logger, $who, $where, $rest, @arguments) = @_;
+
+ return "Syntax: exit" unless @arguments == 0;
+
+ exit;
+}
1;