3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-04 18:38:47 +02:00

Spinach: allow non-admins to inspect settings values

This commit is contained in:
Pragmatic Software 2019-05-08 12:48:10 -07:00
parent e1b6c2d64a
commit 15aaa6fa1a

View File

@ -966,7 +966,7 @@ sub spinach_cmd {
}
my $admin = $self->{pbot}->{admins}->loggedin($self->{channel}, "$nick!$user\@$host");
if (not $admin or $admin->{level} <= 0) {
if (defined $value and (not $admin or $admin->{level} <= 0)) {
return "$nick: Sorry, only Spinach admins may set game settings.";
}