mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
Users: lowercase key in userset
This commit is contained in:
parent
ef4580b2e0
commit
9abc92486d
@ -276,6 +276,8 @@ sub cmd_userset {
|
|||||||
return "There is no user account $name.";
|
return "There is no user account $name.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$key = lc $key;
|
||||||
|
|
||||||
if (defined $value and not $self->{pbot}->{capabilities}->userhas($u, 'can-modify-capabilities')) {
|
if (defined $value and not $self->{pbot}->{capabilities}->userhas($u, 'can-modify-capabilities')) {
|
||||||
if ($key =~ m/^can-/i or $self->{pbot}->{capabilities}->exists($key)) {
|
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.";
|
return "The $key metadata requires the can-modify-capabilities capability, which your user account does not have.";
|
||||||
|
Loading…
Reference in New Issue
Block a user