mirror of
https://github.com/anope/anope.git
synced 2026-07-01 13:26:39 +02:00
@@ -949,7 +949,15 @@ public:
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
if (MOD_RESULT != EVENT_ALLOW && (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")) && source.permission.empty() && !source.HasPriv("chanserv/administration"))
|
||||
auto can_set_successor = ci->HasExt("SECUREFOUNDER")
|
||||
? source.IsFounder(ci)
|
||||
: source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
|
||||
// Special case: users can remove themselves as successor with no other privs.
|
||||
if (param.empty() && source.GetAccount() && source.GetAccount() == ci->GetSuccessor())
|
||||
can_set_successor = true;
|
||||
|
||||
if (MOD_RESULT != EVENT_ALLOW && !can_set_successor && source.permission.empty() && !source.HasPriv("chanserv/administration"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user