mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
ChanOpCommands: respect effective-level override for chan op commands
This commit is contained in:
parent
0f81e39276
commit
8f8b11b9e6
@ -80,7 +80,7 @@ sub ban_user {
|
|||||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||||
return "I don't think so." if $target =~ /^\Q$botnick\E!/i;
|
return "I don't think so." if $target =~ /^\Q$botnick\E!/i;
|
||||||
|
|
||||||
if (not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
if (not $stuff->{'effective-level'} and not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
||||||
return "/msg $nick You are not an admin for $channel.";
|
return "/msg $nick You are not an admin for $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ sub unban_user {
|
|||||||
|
|
||||||
return "/msg $nick Usage for /msg: unban <nick/mask> <channel> [false value to use unban queue]" if $channel !~ /^#/;
|
return "/msg $nick Usage for /msg: unban <nick/mask> <channel> [false value to use unban queue]" if $channel !~ /^#/;
|
||||||
|
|
||||||
if (not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
if (not $stuff->{'effective-level'} and not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
||||||
return "/msg $nick You are not an admin for $channel.";
|
return "/msg $nick You are not an admin for $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ sub mute_user {
|
|||||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||||
return "I don't think so." if $target =~ /^\Q$botnick\E!/i;
|
return "I don't think so." if $target =~ /^\Q$botnick\E!/i;
|
||||||
|
|
||||||
if (not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
if (not $stuff->{'effective-level'} and not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
||||||
return "/msg $nick You are not an admin for $channel.";
|
return "/msg $nick You are not an admin for $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ sub unmute_user {
|
|||||||
|
|
||||||
return "/msg $nick Usage for /msg: unmute <nick/mask> <channel> [false value to use unban queue]" if $channel !~ /^#/;
|
return "/msg $nick Usage for /msg: unmute <nick/mask> <channel> [false value to use unban queue]" if $channel !~ /^#/;
|
||||||
|
|
||||||
if (not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
if (not $stuff->{'effective-level'} and not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
||||||
return "/msg $nick You are not an admin for $channel.";
|
return "/msg $nick You are not an admin for $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ sub kick_user {
|
|||||||
$channel = $1;
|
$channel = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
if (not $stuff->{'effective-level'} and not $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
|
||||||
return "/msg $nick You are not an admin for $channel.";
|
return "/msg $nick You are not an admin for $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user