diff options
Diffstat (limited to 'modules')
99 files changed, 121 insertions, 295 deletions
diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp index ae60f5b5a..41aecd8af 100644 --- a/modules/bs_autoassign.cpp +++ b/modules/bs_autoassign.cpp @@ -14,8 +14,6 @@ class BSAutoAssign : public Module public: BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - Implementation i[] = { I_OnChanRegistered }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void OnChanRegistered(ChannelInfo *ci) anope_override diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 9a0b638c7..7b241f09e 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -154,8 +154,6 @@ class BSAssign : public Module BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsassign(this), commandbsunassign(this) { - Implementation i[] = { I_OnInvite }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void OnInvite(User *source, Channel *c, User *targ) anope_override diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp index aa3cf378d..020044aef 100644 --- a/modules/commands/bs_bot.cpp +++ b/modules/commands/bs_bot.cpp @@ -81,7 +81,7 @@ class CommandBSBot : public Command source.Reply(_("%s!%s@%s (%s) added to the bot list."), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str()); - FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi)); + FOREACH_MOD(OnBotCreate, (bi)); return; } @@ -220,7 +220,7 @@ class CommandBSBot : public Command source.Reply(_("Bot \002%s\002 has been changed to %s!%s@%s (%s)."), oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str()); Log(LOG_ADMIN, source, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname; - FOREACH_MOD(I_OnBotChange, OnBotChange(bi)); + FOREACH_MOD(OnBotChange, (bi)); return; } @@ -247,7 +247,7 @@ class CommandBSBot : public Command return; } - FOREACH_MOD(I_OnBotDelete, OnBotDelete(bi)); + FOREACH_MOD(OnBotDelete, (bi)); Log(LOG_ADMIN, source, this) << "DEL " << bi->nick; diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index 4b869421d..50d4a0e5f 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -771,7 +771,7 @@ class BSKick : public Module Anope::string mask = ci->GetIdealBan(u); ci->c->SetMode(NULL, "BAN", mask); - FOREACH_MOD(I_OnBotBan, OnBotBan(u, ci, mask)); + FOREACH_MOD(OnBotBan, (u, ci, mask)); } } @@ -802,8 +802,6 @@ class BSKick : public Module { me = this; - Implementation i[] = { I_OnPrivmsg }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } ~BSKick() diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index 95500ac94..fa2bd716f 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -495,7 +495,6 @@ class BSSet : public Module commandbsset(this), commandbssetbanexpire(this), commandbssetdontkickops(this), commandbssetdontkickvoices(this), commandbssetfantasy(this), commandbssetgreet(this), commandbssetnobot(this), commandbssetprivate(this) { - ModuleManager::Attach(I_OnBotBan, this); } void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) anope_override 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 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 diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index d7045123f..d9ba97894 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -85,7 +85,7 @@ public: else target_ci->last_topic_setter = source.service->nick; - FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(target_ci)); + FOREACH_MOD(OnChanRegistered, (target_ci)); source.Reply(_("All settings from \002%s\002 have been cloned to \002%s\002."), channel.c_str(), target.c_str()); } diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp index 998dd8ab0..3f14aea65 100644 --- a/modules/commands/cs_drop.cpp +++ b/modules/commands/cs_drop.cpp @@ -52,7 +52,7 @@ class CommandCSDrop : public Command bool override = (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")"; - FOREACH_MOD(I_OnChanDrop, OnChanDrop(ci)); + FOREACH_MOD(OnChanDrop, (ci)); |
