From 85f57b32604465d7a0c460c6fdaeeaa2c8522872 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 25 Oct 2018 16:07:31 +1300 Subject: Admin: require admin cap on prefix changing --- Plugin/Admin.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Plugin') diff --git a/Plugin/Admin.pm b/Plugin/Admin.pm index 404dbf4..cc55e0c 100644 --- a/Plugin/Admin.pm +++ b/Plugin/Admin.pm @@ -228,6 +228,8 @@ sub dump_ignore { sub prefix_rm { my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + return unless is_admin($logger, $who, $ided); + return "Syntax: prefix rm" unless @arguments == 0; my $old = $root_config->{prefix}; @@ -240,6 +242,8 @@ sub prefix_rm { sub prefix_set { my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + return unless is_admin($logger, $who, $ided); + return "Syntax: prefix set " unless @arguments > 0; $root_config->{prefix} = $rest; -- cgit v1.1