3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 20:09:43 +01:00

Users: lowercase key in userset

This commit is contained in:
Pragmatic Software 2020-09-19 12:21:51 -07:00
parent ef4580b2e0
commit 9abc92486d

View File

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