diff options
author | David Phillips <david@yeah.nah.nz> | 2018-10-25 16:07:31 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2018-10-25 16:07:31 +1300 |
commit | 85f57b32604465d7a0c460c6fdaeeaa2c8522872 (patch) | |
tree | 8fbdd3bee0517058a19f1905e01ec2cb3671d9dc | |
parent | 988ff67a270e0a57dd84d5a65071889aa71ae8d1 (diff) | |
download | idalius-85f57b32604465d7a0c460c6fdaeeaa2c8522872.tar.xz |
Admin: require admin cap on prefix changing
-rw-r--r-- | Plugin/Admin.pm | 4 |
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; |