mirror of
https://github.com/anope/anope.git
synced 2026-06-26 14:56:39 +02:00
Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
This commit is contained in:
+2
-2
@@ -308,13 +308,13 @@ bool AccessGroup::HasPriv(const Anope::string &name) const
|
||||
else if (this->founder)
|
||||
return true;
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnGroupCheckPriv, OnGroupCheckPriv(this, name));
|
||||
FOREACH_RESULT(OnGroupCheckPriv, MOD_RESULT, (this, name));
|
||||
if (MOD_RESULT != EVENT_CONTINUE)
|
||||
return MOD_RESULT == EVENT_ALLOW;
|
||||
for (unsigned i = this->size(); i > 0; --i)
|
||||
{
|
||||
ChanAccess *access = this->at(i - 1);
|
||||
FOREACH_RESULT(I_OnCheckPriv, OnCheckPriv(access, name));
|
||||
FOREACH_RESULT(OnCheckPriv, MOD_RESULT, (access, name));
|
||||
if (MOD_RESULT == EVENT_ALLOW || access->HasPriv(name))
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user