3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Users: my command is now aware of is- capabilities

This commit is contained in:
Pragmatic Software 2020-02-09 20:18:55 -08:00
parent 3c3e642bb9
commit c9fed700ef

View File

@ -543,7 +543,7 @@ sub mycmd {
$key = lc $key;
if (defined $value) {
if (not $self->{pbot}->{capabilities}->userhas($u, 'can-modify-capabilities')) {
if ($key =~ m/^can-/ or $self->{pbot}->{capabilities}->exists($key)) {
if ($key =~ m/^is-/ or $key =~ m/^can-/ or $self->{pbot}->{capabilities}->exists($key)) {
return "The $key metadata requires the can-modify-capabilities capability, which your user account does not have.";
}
}