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

Users: my command: add level sanity check

This commit is contained in:
Pragmatic Software 2020-01-25 16:09:43 -08:00
parent dc0909cbcc
commit c36f9d72bb

View File

@ -452,6 +452,10 @@ sub mycmd {
}
}
if ($key eq 'level' and defined $value and $u->{level} < 90 and $value > $u->{level}) {
return "You may not increase your level!";
}
($channel, $hostmask) = $self->find_user_account($channel, $hostmask);
my $result = $self->{users}->set($channel, $hostmask, $key, $value);
$result =~ s/^password => .*;?$/password => <private>;/m;