mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01:00
Users: my
command: add level sanity check
This commit is contained in:
parent
dc0909cbcc
commit
c36f9d72bb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user