mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 10:34:52 +01:00
ActionTrigger: Ensure level argument passed by users
This commit is contained in:
parent
22b90e90f7
commit
c5567fc529
@ -225,6 +225,10 @@ sub actiontrigger {
|
||||
return "Trigger already exists.";
|
||||
}
|
||||
|
||||
if ($level !~ m/\d+/) {
|
||||
return "$nick: Missing level argument?\n";
|
||||
}
|
||||
|
||||
if ($level > 0) {
|
||||
my $admin = $self->{pbot}->{admins}->find_admin($channel, "$nick!$user\@$host");
|
||||
if (not defined $admin or $level > $admin->{level}) {
|
||||
|
Loading…
Reference in New Issue
Block a user