3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-27 13:12:42 +01:00

Users: userset without key lists all keys and values again

This commit is contained in:
Pragmatic Software 2020-10-05 15:23:05 -07:00
parent 51dabf2bf4
commit 3e7798abe0

View File

@ -276,7 +276,7 @@ sub cmd_userset {
return "There is no user account $name.";
}
$key = lc $key;
$key = lc $key if defined $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)) {