From 37b3535543b81c3d75c8f62b83d422f0d2fbced0 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 May 2013 19:36:37 -0400 Subject: Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module --- modules/commands/cs_akick.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/commands/cs_akick.cpp') 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 -- cgit