aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Admin.pm
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2018-10-25 16:07:31 +1300
committerDavid Phillips <david@yeah.nah.nz>2018-10-25 16:07:31 +1300
commit85f57b32604465d7a0c460c6fdaeeaa2c8522872 (patch)
tree8fbdd3bee0517058a19f1905e01ec2cb3671d9dc /Plugin/Admin.pm
parent988ff67a270e0a57dd84d5a65071889aa71ae8d1 (diff)
downloadidalius-85f57b32604465d7a0c460c6fdaeeaa2c8522872.tar.xz
Admin: require admin cap on prefix changing
Diffstat (limited to 'Plugin/Admin.pm')
-rw-r--r--Plugin/Admin.pm4
1 files changed, 4 insertions, 0 deletions
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 <new prefix>" unless @arguments > 0;
$root_config->{prefix} = $rest;