From 14c1d55b97d61de7eb48acd4a5b745e2ba5e977a Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 3 Sep 2018 15:20:36 +1200 Subject: Add exit command --- Plugin/Admin.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Plugin/Admin.pm') 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; -- cgit v1.1