summaryrefslogtreecommitdiff
path: root/modules/commands/cs_access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-27 19:36:37 -0400
committerAdam <Adam@anope.org>2013-05-27 19:36:37 -0400
commit37b3535543b81c3d75c8f62b83d422f0d2fbced0 (patch)
tree8a062415c91d352e4b6bd180cbf238d1f159802d /modules/commands/cs_access.cpp
parentc21e8d9204f9b671177a63d4daa21957bffc1d9f (diff)
Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r--modules/commands/cs_access.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index 64b2386fb..8562efeb4 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -175,7 +175,7 @@ class CommandCSAccess : public Command
access->created = Anope::CurTime;
ci->AddAccess(access);
- FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, source, access));
+ FOREACH_MOD(OnAccessAdd, (ci, source, access));
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << " with level " << level;
source.Reply(_("\002%s\002 added to %s access list at level \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
@@ -258,7 +258,7 @@ class CommandCSAccess : public Command
else
Nicks = access->mask;
- FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, access));
+ FOREACH_MOD(OnAccessDel, (ci, source, access));
ci->EraseAccess(Number - 1);
}
@@ -284,7 +284,7 @@ class CommandCSAccess : public Command
bool override = !u_access.founder && !u_access.HasPriv("ACCESS_CHANGE") && !access->mask.equals_ci(source.nc->display);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << access->mask;
- FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, access));
+ FOREACH_MOD(OnAccessDel, (ci, source, access));
delete access;
}
return;
@@ -429,7 +429,7 @@ class CommandCSAccess : public Command
source.Reply(ACCESS_DENIED);
else
{
- FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
+ FOREACH_MOD(OnAccessClear, (ci, source));
ci->ClearAccess();
@@ -597,7 +597,7 @@ class CommandCSLevels : public Command
else
{
ci->SetLevel(p->name, level);
- FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, p->name, level));
+ FOREACH_MOD(OnLevelChange, (source, ci, p->name, level));
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to set " << p->name << " to level " << level;
@@ -621,7 +621,7 @@ class CommandCSLevels : public Command
if (p != NULL)
{
ci->SetLevel(p->name, ACCESS_INVALID);
- FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, p->name, ACCESS_INVALID));
+ FOREACH_MOD(OnLevelChange, (source, ci, p->name, ACCESS_INVALID));
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable " << p->name;
@@ -673,7 +673,7 @@ class CommandCSLevels : public Command
void DoReset(CommandSource &source, ChannelInfo *ci)
{
reset_levels(ci);
- FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, "ALL", 0));
+ FOREACH_MOD(OnLevelChange, (source, ci, "ALL", 0));
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to reset all levels";
@@ -791,8 +791,6 @@ class CSAccess : public Module
{
this->SetPermanent(true);
- Implementation i[] = { I_OnReload, I_OnCreateChan, I_OnGroupCheckPriv };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override