diff options
author | Adam <Adam@anope.org> | 2013-05-27 19:36:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-27 19:36:37 -0400 |
commit | 37b3535543b81c3d75c8f62b83d422f0d2fbced0 (patch) | |
tree | 8a062415c91d352e4b6bd180cbf238d1f159802d /modules/commands/cs_akick.cpp | |
parent | c21e8d9204f9b671177a63d4daa21957bffc1d9f (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_akick.cpp')
-rw-r--r-- | modules/commands/cs_akick.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 1cce6afbe..b54fca191 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -160,7 +160,7 @@ class CommandCSAKick : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << (reason == "" ? "" : ": ") << reason; - FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(source, ci, akick)); + FOREACH_MOD(OnAkickAdd, (source, ci, akick)); source.Reply(_("\002%s\002 added to %s autokick list."), mask.c_str(), ci->name.c_str()); @@ -210,7 +210,7 @@ class CommandCSAKick : public Command if (!number || number > ci->GetAkickCount()) return; - FOREACH_MOD(I_OnAkickDel, OnAkickDel(source, ci, ci->GetAkick(number - 1))); + FOREACH_MOD(OnAkickDel, (source, ci, ci->GetAkick(number - 1))); ++deleted; ci->EraseAkick(number - 1); @@ -241,7 +241,7 @@ class CommandCSAKick : public Command bool override = !source.AccessFor(ci).HasPriv("AKICK"); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << mask; - FOREACH_MOD(I_OnAkickDel, OnAkickDel(source, ci, ci->GetAkick(i))); + FOREACH_MOD(OnAkickDel, (source, ci, ci->GetAkick(i))); ci->EraseAkick(i); @@ -512,8 +512,6 @@ class CSAKick : public Module CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsakick(this) { - Implementation i[] = { I_OnCheckKick }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override |