diff options
author | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
commit | 26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch) | |
tree | b9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/commands/cs_xop.cpp | |
parent | 0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff) |
New event system
Diffstat (limited to 'modules/commands/cs_xop.cpp')
-rw-r--r-- | modules/commands/cs_xop.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 49cb96eb4..84a8fbfb7 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -216,7 +216,7 @@ class CommandCSXOP : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask; - FOREACH_MOD(OnAccessAdd, (ci, source, acc)); + Event::OnAccessAdd(&Event::AccessAdd::OnAccessAdd, ci, source, acc); source.Reply(_("\002%s\002 added to %s %s list."), acc->mask.c_str(), ci->name.c_str(), source.command.c_str()); } @@ -325,7 +325,7 @@ class CommandCSXOP : public Command nicks = caccess->mask; ci->EraseAccess(number - 1); - FOREACH_MOD(OnAccessDel, (ci, source, caccess)); + Event::OnAccessDel(&Event::AccessDel::OnAccessDel, ci, source, caccess); delete caccess; } } @@ -348,7 +348,7 @@ class CommandCSXOP : public Command source.Reply(_("\002%s\002 deleted from %s %s list."), a->mask.c_str(), ci->name.c_str(), source.command.c_str()); ci->EraseAccess(i); - FOREACH_MOD(OnAccessDel, (ci, source, a)); + Event::OnAccessDel(&Event::AccessDel::OnAccessDel, ci, source, a); delete a; return; @@ -475,7 +475,7 @@ class CommandCSXOP : public Command delete ci->EraseAccess(i - 1); } - FOREACH_MOD(OnAccessClear, (ci, source)); + Event::OnAccessClear(&Event::AccessClear::OnAccessClear, ci, source); source.Reply(_("Channel %s %s list has been cleared."), ci->name.c_str(), source.command.c_str()); } @@ -593,8 +593,9 @@ class CSXOP : public Module CommandCSXOP commandcsxop; public: - CSXOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - accessprovider(this), commandcsxop(this) + CSXOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) + , accessprovider(this) + , commandcsxop(this) { this->SetPermanent(true); |