summaryrefslogtreecommitdiff
path: root/modules/commands
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
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')
-rw-r--r--modules/commands/bs_assign.cpp2
-rw-r--r--modules/commands/bs_bot.cpp6
-rw-r--r--modules/commands/bs_kick.cpp4
-rw-r--r--modules/commands/bs_set.cpp1
-rw-r--r--modules/commands/cs_access.cpp16
-rw-r--r--modules/commands/cs_akick.cpp8
-rw-r--r--modules/commands/cs_clone.cpp2
-rw-r--r--modules/commands/cs_drop.cpp2
-rw-r--r--modules/commands/cs_entrymsg.cpp2
-rw-r--r--modules/commands/cs_fantasy_stats.cpp2
-rw-r--r--modules/commands/cs_fantasy_top.cpp2
-rw-r--r--modules/commands/cs_flags.cpp8
-rw-r--r--modules/commands/cs_info.cpp2
-rw-r--r--modules/commands/cs_log.cpp2
-rw-r--r--modules/commands/cs_register.cpp2
-rw-r--r--modules/commands/cs_seen.cpp9
-rw-r--r--modules/commands/cs_set.cpp34
-rw-r--r--modules/commands/cs_set_misc.cpp4
-rw-r--r--modules/commands/cs_suspend.cpp6
-rw-r--r--modules/commands/cs_topic.cpp4
-rw-r--r--modules/commands/cs_xop.cpp10
-rw-r--r--modules/commands/help.cpp4
-rw-r--r--modules/commands/hs_del.cpp4
-rw-r--r--modules/commands/hs_request.cpp2
-rw-r--r--modules/commands/hs_set.cpp4
-rw-r--r--modules/commands/ms_cancel.cpp4
-rw-r--r--modules/commands/ms_del.cpp12
-rw-r--r--modules/commands/ns_access.cpp2
-rw-r--r--modules/commands/ns_ajoin.cpp2
-rw-r--r--modules/commands/ns_cert.cpp2
-rw-r--r--modules/commands/ns_drop.cpp2
-rw-r--r--modules/commands/ns_group.cpp6
-rw-r--r--modules/commands/ns_identify.cpp2
-rw-r--r--modules/commands/ns_info.cpp2
-rw-r--r--modules/commands/ns_logout.cpp2
-rw-r--r--modules/commands/ns_recover.cpp4
-rw-r--r--modules/commands/ns_register.cpp2
-rw-r--r--modules/commands/ns_resetpass.cpp1
-rw-r--r--modules/commands/ns_set.cpp24
-rw-r--r--modules/commands/ns_set_misc.cpp4
-rw-r--r--modules/commands/ns_suspend.cpp6
-rw-r--r--modules/commands/ns_update.cpp2
-rw-r--r--modules/commands/os_akill.cpp6
-rw-r--r--modules/commands/os_defcon.cpp6
-rw-r--r--modules/commands/os_dns.cpp2
-rw-r--r--modules/commands/os_forbid.cpp2
-rw-r--r--modules/commands/os_ignore.cpp2
-rw-r--r--modules/commands/os_login.cpp1
-rw-r--r--modules/commands/os_news.cpp2
-rw-r--r--modules/commands/os_noop.cpp1
-rw-r--r--modules/commands/os_session.cpp6
-rw-r--r--modules/commands/os_sxline.cpp8
52 files changed, 95 insertions, 162 deletions
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));
Reference<Channel> c = ci->c;
delete ci;
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp
index c5e31f122..f94aca44c 100644
--- a/modules/commands/cs_entrymsg.cpp
+++ b/modules/commands/cs_entrymsg.cpp
@@ -272,8 +272,6 @@ class CSEntryMessage : public Module
CSEntryMessage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), entrymsg_type("EntryMsg", EntryMsg::Unserialize), commandentrymsg(this)
{
- Implementation i[] = { I_OnJoinChannel };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnJoinChannel(User *u, Channel *c) anope_override
diff --git a/modules/commands/cs_fantasy_stats.cpp b/modules/commands/cs_fantasy_stats.cpp
index a7324bf9f..d54ed4a92 100644
--- a/modules/commands/cs_fantasy_stats.cpp
+++ b/modules/commands/cs_fantasy_stats.cpp
@@ -71,8 +71,6 @@ class CSStats : public Module
{
me = this;
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/cs_fantasy_top.cpp b/modules/commands/cs_fantasy_top.cpp
index ca2e67ab9..bc08c4c9d 100644
--- a/modules/commands/cs_fantasy_top.cpp
+++ b/modules/commands/cs_fantasy_top.cpp
@@ -96,8 +96,6 @@ class CSTop : public Module
{
me = this;
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index 4867b9029..23e6914d3 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -178,7 +178,7 @@ class CommandCSFlags : public Command
{
if (current != NULL)
{
- FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, current));
+ FOREACH_MOD(OnAccessDel, (ci, source, current));
delete current;
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << mask;
source.Reply(_("\002%s\002 removed from the %s access list."), mask.c_str(), ci->name.c_str());
@@ -206,7 +206,7 @@ class CommandCSFlags : public Command
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 modify " << mask << "'s flags to " << access->AccessSerialize();
source.Reply(_("Access for \002%s\002 on %s set to +\002%s\002"), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
@@ -285,7 +285,7 @@ class CommandCSFlags : public Command
{
ci->ClearAccess();
- FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
+ FOREACH_MOD(OnAccessClear, (ci, source));
source.Reply(_("Channel %s access list has been cleared."), ci->name.c_str());
@@ -391,8 +391,6 @@ class CSFlags : public Module
{
this->SetPermanent(true);
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, 1);
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index 3f9a014bb..0d3623c00 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -105,7 +105,7 @@ class CommandCSInfo : public Command
info["Expires on"] = Anope::strftime(ci->last_used + chanserv_expire);
}
- FOREACH_MOD(I_OnChanInfo, OnChanInfo(source, ci, info, show_all));
+ FOREACH_MOD(OnChanInfo, (source, ci, info, show_all));
std::vector<Anope::string> replies;
info.Process(replies);
diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp
index a7987a740..969ebe5ab 100644
--- a/modules/commands/cs_log.cpp
+++ b/modules/commands/cs_log.cpp
@@ -186,8 +186,6 @@ class CSLog : public Module
MSService("MemoServService", "MemoServ"), commandcslog(this)
{
- Implementation i[] = { I_OnLog };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnLog(Log *l) anope_override
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp
index 4d4bc9353..135f833be 100644
--- a/modules/commands/cs_register.cpp
+++ b/modules/commands/cs_register.cpp
@@ -75,7 +75,7 @@ class CommandCSRegister : public Command
c->SetCorrectModes(u, true);
}
- FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(ci));
+ FOREACH_MOD(OnChanRegistered, (ci));
}
}
diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp
index aacd3c168..877fc31b7 100644
--- a/modules/commands/cs_seen.cpp
+++ b/modules/commands/cs_seen.cpp
@@ -296,15 +296,6 @@ class CSSeen : public Module
public:
CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), seeninfo_type("SeenInfo", SeenInfo::Unserialize), commandseen(this), commandosseen(this)
{
-
- Implementation eventlist[] = { I_OnExpireTick,
- I_OnUserConnect,
- I_OnUserNickChange,
- I_OnUserQuit,
- I_OnJoinChannel,
- I_OnPartChannel,
- I_OnPreUserKicked };
- ModuleManager::Attach(eventlist, this, sizeof(eventlist) / sizeof(Implementation));
}
void OnExpireTick() anope_override
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 45373e254..1211c5ed0 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -73,7 +73,7 @@ class CommandCSSetAutoOp : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -130,7 +130,7 @@ class CommandCSSetBanType : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -191,7 +191,7 @@ class CommandCSSetChanstats : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -245,7 +245,7 @@ class CommandCSSetDescription : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -300,7 +300,7 @@ class CommandCSSetFounder : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -363,7 +363,7 @@ class CommandCSSetKeepTopic : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -420,7 +420,7 @@ class CommandCSSetPeace : public Command
return;
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -479,7 +479,7 @@ class CommandCSSetPersist : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -627,7 +627,7 @@ class CommandCSSetPrivate : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -689,7 +689,7 @@ class CommandCSSetRestricted : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -745,7 +745,7 @@ class CommandCSSetSecure : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -803,7 +803,7 @@ class CommandCSSetSecureFounder : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -861,7 +861,7 @@ class CommandCSSetSecureOps : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -917,7 +917,7 @@ class CommandCSSetSignKick : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -988,7 +988,7 @@ class CommandCSSetSuccessor : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -1128,10 +1128,6 @@ class CSSet : public Module
commandcssetsecure(this), commandcssetsecurefounder(this), commandcssetsecureops(this), commandcssetsignkick(this),
commandcssetsuccessor(this), commandcssetnoexpire(this)
{
-
- Implementation i[] = { I_OnCheckKick, I_OnDelChan, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnCheckDelete, I_OnJoinChannel,
- I_OnSetCorrectModes };
- 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_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index 5f1359f18..21ebec815 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -85,7 +85,7 @@ class CommandCSSetMisc : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -136,8 +136,6 @@ class CSSetMisc : public Module
CSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
csmiscdata_type("CSMiscData", CSMiscData::Unserialize), commandcssetmisc(this)
{
- Implementation i[] = { I_OnReload, I_OnChanInfo };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp
index 88a369e58..98015a1f3 100644
--- a/modules/commands/cs_suspend.cpp
+++ b/modules/commands/cs_suspend.cpp
@@ -74,7 +74,7 @@ class CommandCSSuspend : public Command
Log(LOG_ADMIN, source, this, ci) << (!reason.empty() ? reason : "No reason") << ", expires in " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never");
source.Reply(_("Channel \002%s\002 is now suspended."), ci->name.c_str());
- FOREACH_MOD(I_OnChanSuspend, OnChanSuspend(ci));
+ FOREACH_MOD(OnChanSuspend, (ci));
return;
}
@@ -136,7 +136,7 @@ class CommandCSUnSuspend : public Command
source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str());
- FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci));
+ FOREACH_MOD(OnChanUnsuspend, (ci));
return;
}
@@ -161,8 +161,6 @@ class CSSuspend : public Module
commandcssuspend(this), commandcsunsuspend(this)
{
- Implementation i[] = { I_OnChanInfo, I_OnPreChanExpire, I_OnCheckKick };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) anope_override
diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp
index 64e710017..294689864 100644
--- a/modules/commands/cs_topic.cpp
+++ b/modules/commands/cs_topic.cpp
@@ -16,7 +16,7 @@ class CommandCSTopic : public Command
void Lock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, "topiclock on"));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, "topiclock on"));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -27,7 +27,7 @@ class CommandCSTopic : public Command
void Unlock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, "topiclock off"));
+ FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, "topiclock off"));
if (MOD_RESULT == EVENT_STOP)
return;
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 192eb4529..253dde884 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -182,7 +182,7 @@ class CommandCSXOP : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask;
- FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, source, acc));
+ FOREACH_MOD(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());
}
@@ -287,7 +287,7 @@ class CommandCSXOP : public Command
else
nicks = caccess->mask;
- FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, caccess));
+ FOREACH_MOD(OnAccessDel, (ci, source, caccess));
ci->EraseAccess(number - 1);
}
@@ -307,7 +307,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());
- FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, a));
+ FOREACH_MOD(OnAccessDel, (ci, source, a));
delete a;
return;
@@ -431,7 +431,7 @@ class CommandCSXOP : public Command
ci->EraseAccess(i - 1);
}
- FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
+ FOREACH_MOD(OnAccessClear, (ci, source));
source.Reply(_("Channel %s %s list has been cleared."), ci->name.c_str(), source.command.c_str());
}
@@ -554,8 +554,6 @@ class CSXOP : public Module
{
this->SetPermanent(true);
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp
index 47ce98825..ac8c98b09 100644
--- a/modules/commands/help.cpp
+++ b/modules/commands/help.cpp
@@ -37,7 +37,7 @@ class CommandHelp : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnPreHelp, OnPreHelp(source, params));
+ FOREACH_RESULT(OnPreHelp, MOD_RESULT, (source, params));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -184,7 +184,7 @@ class CommandHelp : public Command
source.Reply(_("No help available for \002%s\002."), params[0].c_str());
}
- FOREACH_MOD(I_OnPostHelp, OnPostHelp(source, params));
+ FOREACH_MOD(OnPostHelp, (source, params));
return;
}
diff --git a/modules/commands/hs_del.cpp b/modules/commands/hs_del.cpp
index 1fa4f7b31..cf1a0d84a 100644
--- a/modules/commands/hs_del.cpp
+++ b/modules/commands/hs_del.cpp
@@ -27,7 +27,7 @@ class CommandHSDel : public Command
if (na)
{
Log(LOG_ADMIN, source, this) << "for user " << na->nick;
- FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
+ FOREACH_MOD(OnDeleteVhost, (na));
na->RemoveVhost();
source.Reply(_("Vhost for \002%s\002 removed."), nick.c_str());
}
@@ -60,7 +60,7 @@ class CommandHSDelAll : public Command
NickAlias *na = NickAlias::Find(nick);
if (na)
{
- FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
+ FOREACH_MOD(OnDeleteVhost, (na));
const NickCore *nc = na->nc;
for (unsigned i = 0; i < nc->aliases->size(); ++i)
{
diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp
index d12973e01..6cd2b314f 100644
--- a/modules/commands/hs_request.cpp
+++ b/modules/commands/hs_request.cpp
@@ -190,7 +190,7 @@ class CommandHSActivate : public Command
if (req)
{
na->SetVhost(req->ident, req->host, source.GetNick(), req->time);
- FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
+ FOREACH_MOD(OnSetVhost, (na));
if (Config->GetModule(this->owner)->Get<bool>("memouser") && memoserv)
memoserv->Send(source.service->nick, na->nick, _("[auto memo] Your requested vHost has been approved."), true);
diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp
index 834ac5fc1..5e7f9f2af 100644
--- a/modules/commands/hs_set.cpp
+++ b/modules/commands/hs_set.cpp
@@ -80,7 +80,7 @@ class CommandHSSet : public Command
Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
na->SetVhost(user, host, source.GetNick());
- FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
+ FOREACH_MOD(OnSetVhost, (na));
if (!user.empty())
source.Reply(_("VHost for \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), user.c_str(), host.c_str());
else
@@ -182,7 +182,7 @@ class CommandHSSetAll : public Command
na->SetVhost(user, host, source.GetNick());
this->Sync(na);
- FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
+ FOREACH_MOD(OnSetVhost, (na));
if (!user.empty())
source.Reply(_("VHost for group \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), user.c_str(), host.c_str());
else
diff --git a/modules/commands/ms_cancel.cpp b/modules/commands/ms_cancel.cpp
index cf1a0809f..18ddcfa09 100644
--- a/modules/commands/ms_cancel.cpp
+++ b/modules/commands/ms_cancel.cpp
@@ -41,9 +41,9 @@ class CommandMSCancel : public Command
if (mi->GetMemo(i)->unread && source.nc->display.equals_ci(mi->GetMemo(i)->sender))
{
if (ischan)
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(i)));
+ FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(i)));
else
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(na->nc, mi, mi->GetMemo(i)));
+ FOREACH_MOD(OnMemoDel, (na->nc, mi, mi->GetMemo(i)));
mi->Del(i);
source.Reply(_("Last memo to \002%s\002 has been cancelled."), nname.c_str());
return;
diff --git a/modules/commands/ms_del.cpp b/modules/commands/ms_del.cpp
index dac5ae43e..c789e697b 100644
--- a/modules/commands/ms_del.cpp
+++ b/modules/commands/ms_del.cpp
@@ -27,9 +27,9 @@ class MemoDelCallback : public NumberList
return;
if (ci)
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(number - 1)));
+ FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(number - 1)));
else
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(number - 1)));
+ FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(number - 1)));
mi->Del(number - 1);
source.Reply(_("Memo %d has been deleted."), number);
@@ -97,9 +97,9 @@ class CommandMSDel : public Command
{
/* Delete last memo. */
if (ci)
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(mi->memos->size() - 1)));
+ FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(mi->memos->size() - 1)));
else
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(mi->memos->size() - 1)));
+ FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(mi->memos->size() - 1)));
mi->Del(mi->memos->size() - 1);
source.Reply(_("Memo %d has been deleted."), mi->memos->size() + 1);
}
@@ -109,9 +109,9 @@ class CommandMSDel : public Command
for (unsigned i = 0, end = mi->memos->size(); i < end; ++i)
{
if (ci)
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(i)));
+ FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(i)));
else
- FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(i)));
+ FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(i)));
delete mi->GetMemo(i);
}
mi->memos->clear();
diff --git a/modules/commands/ns_access.cpp b/modules/commands/ns_access.cpp
index 4fa3a2074..d42ef5bc6 100644
--- a/modules/commands/ns_access.cpp
+++ b/modules/commands/ns_access.cpp
@@ -180,8 +180,6 @@ class NSAccess : public Module
NSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandnsaccess(this)
{
- Implementation i[] = { I_OnNickRegister };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnNickRegister(User *u, NickAlias *na) anope_override
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp
index 0de8b43ff..836e0cf6d 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/commands/ns_ajoin.cpp
@@ -242,8 +242,6 @@ class NSAJoin : public Module
if (!IRCD->CanSVSJoin)
throw ModuleException("Your IRCd does not support SVSJOIN");
- Implementation i[] = { I_OnNickIdentify };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnNickIdentify(User *u) anope_override
diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp
index 022d803ea..dc877e467 100644
--- a/modules/commands/ns_cert.cpp
+++ b/modules/commands/ns_cert.cpp
@@ -225,8 +225,6 @@ class NSCert : public Module
if (!IRCD || !IRCD->CanCertFP)
throw ModuleException("Your IRCd does not support ssl client certificates");
- Implementation i[] = { I_OnFingerprint };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
diff --git a/modules/commands/ns_drop.cpp b/modules/commands/ns_drop.cpp
index a21cac709..1cb83994e 100644
--- a/modules/commands/ns_drop.cpp
+++ b/modules/commands/ns_drop.cpp
@@ -45,7 +45,7 @@ class CommandNSDrop : public Command
source.Reply(_("You may not drop other Services Operators' nicknames."));
else
{
- FOREACH_MOD(I_OnNickDrop, OnNickDrop(source, na));
+ FOREACH_MOD(OnNickDrop, (source, na));
Log(!is_mine ? LOG_ADMIN : LOG_COMMAND, source, this) << "to drop nickname " << na->nick << " (group: " << na->nc->display << ") (email: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
delete na;
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index 9b202b31c..989fc1385 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -31,7 +31,7 @@ class NSGroupRequest : public IdentifyRequest
/* If the nick is already registered, drop it. */
if (na)
{
- FOREACH_MOD(I_OnChangeCoreDisplay, OnChangeCoreDisplay(na->nc, u->nick));
+ FOREACH_MOD(OnChangeCoreDisplay, (na->nc, u->nick));
delete na;
}
@@ -44,7 +44,7 @@ class NSGroupRequest : public IdentifyRequest
u->Login(target->nc);
IRCD->SendLogin(u);
- FOREACH_MOD(I_OnNickGroup, OnNickGroup(u, target));
+ FOREACH_MOD(OnNickGroup, (u, target));
Log(LOG_COMMAND, source, cmd) << "makes " << nick << " join group of " << target->nick << " (" << target->nc->display << ") (email: " << (!target->nc->email.empty() ? target->nc->email : "none") << ")";
source.Reply(_("You are now in the group of \002%s\002."), target->nick.c_str());
@@ -147,7 +147,7 @@ class CommandNSGroup : public Command
if (ok == false && !pass.empty())
{
NSGroupRequest *req = new NSGroupRequest(owner, source, this, u->nick, target, pass);
- FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req));
+ FOREACH_MOD(OnCheckAuthentication, (source.GetUser(), req));
req->Dispatch();
}
else
diff --git a/modules/commands/ns_identify.cpp b/modules/commands/ns_identify.cpp
index aec43c1be..d66913851 100644
--- a/modules/commands/ns_identify.cpp
+++ b/modules/commands/ns_identify.cpp
@@ -82,7 +82,7 @@ class CommandNSIdentify : public Command
else
{
NSIdentifyRequest *req = new NSIdentifyRequest(owner, source, this, na ? na->nc->display : nick, pass);
- FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(u, req));
+ FOREACH_MOD(OnCheckAuthentication, (u, req));
req->Dispatch();
}
return;
diff --git a/modules/commands/ns_info.cpp b/modules/commands/ns_info.cpp
index f1de95275..864136cd8 100644
--- a/modules/commands/ns_info.cpp
+++ b/modules/commands/ns_info.cpp
@@ -135,7 +135,7 @@ class CommandNSInfo : public Command
}
}
- FOREACH_MOD(I_OnNickInfo, OnNickInfo(source, na, info, show_hidden));
+ FOREACH_MOD(OnNickInfo, (source, na, info, show_hidden));
std::vector<Anope::string> replies;
info.Process(replies);
diff --git a/modules/commands/ns_logout.cpp b/modules/commands/ns_logout.cpp
index d5765b0f6..28559d314 100644
--- a/modules/commands/ns_logout.cpp
+++ b/modules/commands/ns_logout.cpp
@@ -54,7 +54,7 @@ class CommandNSLogout : public Command
u2->Logout();
/* Send out an event */
- FOREACH_MOD(I_OnNickLogout, OnNickLogout(u2));
+ FOREACH_MOD(OnNickLogout, (u2));
}
return;
}
diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp
index 33bc9d19e..224b4e2ed 100644
--- a/modules/commands/ns_recover.cpp
+++ b/modules/commands/ns_recover.cpp
@@ -169,7 +169,7 @@ class CommandNSRecover : public Command
if (ok == false && !pass.empty())
{
NSRecoverRequest *req = new NSRecoverRequest(owner, source, this, na->nick, pass);
- FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req));
+ FOREACH_MOD(OnCheckAuthentication, (source.GetUser(), req));
req->Dispatch();
}
else
@@ -209,8 +209,6 @@ class NSRecover : public Module
if (Config->GetBlock("options")->Get<bool>("nonicknameownership"))
throw ModuleException(modname + " can not be used with options:nonicknameownership enabled");
- Implementation i[] = { I_OnUserNickChange, I_OnJoinChannel, I_OnShutdown, I_OnRestart };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
~NSRecover()
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index ac1c55696..4064ce924 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -194,7 +194,7 @@ class CommandNSRegister : public Command
Log(LOG_COMMAND, source, this) << "to register " << na->nick << " (email: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
- FOREACH_MOD(I_OnNickRegister, OnNickRegister(source.GetUser(), na));
+ FOREACH_MOD(OnNickRegister, (source.GetUser(), na));
if (na->nc->GetAccessCount())
source.Reply(_("Nickname \002%s\002 registered under your user@host-mask: %s"), u_nick.c_str(), na->nc->GetAccess(0).c_str());
diff --git a/modules/commands/ns_resetpass.cpp b/modules/commands/ns_resetpass.cpp
index 44d941662..9b15e53ac 100644
--- a/modules/commands/ns_resetpass.cpp
+++ b/modules/commands/ns_resetpass.cpp
@@ -71,7 +71,6 @@ class NSResetPass : public Module
throw ModuleException("Not using mail.");
- ModuleManager::Attach(I_OnPreCommand, this);
}
~NSResetPass()
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index fd32fb2be..4b2dfe684 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -224,7 +224,7 @@ class CommandNSSetAutoOp : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -306,7 +306,7 @@ class CommandNSSetChanstats : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, na->nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, na->nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -395,7 +395,7 @@ class CommandNSSetDisplay : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, user_na->nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, user_na->nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -510,7 +510,7 @@ class CommandNSSetEmail : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -599,7 +599,7 @@ class CommandNSSetGreet : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -682,7 +682,7 @@ class CommandNSSetHide : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -811,7 +811,7 @@ class CommandNSSetKill : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -937,7 +937,7 @@ class CommandNSSetLanguage : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -1045,7 +1045,7 @@ class CommandNSSetMessage : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -1134,7 +1134,7 @@ class CommandNSSetPrivate : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -1223,7 +1223,7 @@ class CommandNSSetSecure : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -1399,8 +1399,6 @@ class NSSet : public Module
commandnssasetnoexpire(this)
{
- Implementation i[] = { I_OnPreCommand, I_OnSetCorrectModes };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override
diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp
index 753450414..15fb0ed33 100644
--- a/modules/commands/ns_set_misc.cpp
+++ b/modules/commands/ns_set_misc.cpp
@@ -87,7 +87,7 @@ class CommandNSSetMisc : public Command
NickCore *nc = na->nc;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
+ FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
if (MOD_RESULT == EVENT_STOP)
return;
@@ -155,8 +155,6 @@ class NSSetMisc : public Module
NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
nsmiscdata_type("NSMiscData", NSMiscData::Unserialize), commandnssetmisc(this), commandnssasetmisc(this)
{
- Implementation i[] = { I_OnReload, I_OnNickInfo };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp
index eadb35d7d..0db7cd951 100644
--- a/modules/commands/ns_suspend.cpp
+++ b/modules/commands/ns_suspend.cpp
@@ -94,7 +94,7 @@ class CommandNSSuspend : public Command
Log(LOG_ADMIN, source, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << "), expires in " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never");
source.Reply(_("Nick %s is now suspended."), nick.c_str());
- FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na));
+ FOREACH_MOD(OnNickSuspend, (na));
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
@@ -150,7 +150,7 @@ class CommandNSUnSuspend : public Command
Log(LOG_ADMIN, source, this) << "for " << na->nick;
source.Reply(_("Nick %s is now released."), nick.c_str());
- FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na));
+ FOREACH_MOD(OnNickUnsuspended, (na));
return;
}
@@ -173,8 +173,6 @@ class NSSuspend : public Module
NSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandnssuspend(this), commandnsunsuspend(this)
{
- Implementation i[] = { I_OnPreNickExpire, I_OnNickInfo };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) anope_override
diff --git a/modules/commands/ns_update.cpp b/modules/commands/ns_update.cpp
index b56f8eded..2676c886f 100644
--- a/modules/commands/ns_update.cpp
+++ b/modules/commands/ns_update.cpp
@@ -31,7 +31,7 @@ class CommandNSUpdate : public Command
na->last_seen = Anope::CurTime;
}
- FOREACH_MOD(I_OnNickUpdate, OnNickUpdate(u));
+ FOREACH_MOD(OnNickUpdate, (u));
source.Reply(_("Status updated (memos, vhost, chmodes, flags)."));
}
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp
index 34e6dbd2b..ef783c8af 100644
--- a/modules/commands/os_akill.cpp
+++ b/modules/commands/os_akill.cpp
@@ -180,7 +180,7 @@ class CommandOSAKill : public Command
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnAddXLine, OnAddXLine(source, x, akills));
+ FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, akills));
if (MOD_RESULT == EVENT_STOP)
{
delete x;
@@ -231,7 +231,7 @@ class CommandOSAKill : public Command
do
{
- FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, x, akills));
+ FOREACH_MOD(OnDelXLine, (source, x, akills));
source.Reply(_("\002%s\002 deleted from the AKILL list."), x->mask.c_str());
AkillDelCallback::DoDel(source, x);
@@ -353,7 +353,7 @@ class CommandOSAKill : public Command
for (unsigned i = akills->GetCount(); i > 0; --i)
{
XLine *x = akills->GetEntry(i - 1);
- FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, x, akills));
+ FOREACH_MOD(OnDelXLine, (source, x, akills));
akills->DelXLine(x);
}
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp
index ba695649d..8bea10d0f 100644
--- a/modules/commands/os_defcon.cpp
+++ b/modules/commands/os_defcon.cpp
@@ -125,7 +125,7 @@ class DefConTimeout : public Timer
if (DConfig.defaultlevel != level)
{
DConfig.defaultlevel = level;
- FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level));
+ FOREACH_MOD(OnDefconLevel, (level));
Log(Config->GetClient("OperServ"), "operserv/defcon") << "Defcon level timeout, returning to level " << level;
if (DConfig.globalondefcon)
@@ -203,7 +203,7 @@ class CommandOSDefcon : public Command
DConfig.defaultlevel = newLevel;
- FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(newLevel));
+ FOREACH_MOD(OnDefconLevel, (newLevel));
delete timeout;
@@ -333,8 +333,6 @@ class OSDefcon : public Module
OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), session_service("SessionService", "session"), akills("XLineManager", "xlinemanager/sgline"), commandosdefcon(this)
{
- Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelSync };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp
index 32e6be59d..c71b1f887 100644
--- a/modules/commands/os_dns.cpp
+++ b/modules/commands/os_dns.cpp
@@ -656,8 +656,6 @@ class ModuleDNS : public Module
zone_type("DNSZone", DNSZone::Unserialize), dns_type("DNSServer", DNSServer::Unserialize), commandosdns(this)
{
- Implementation i[] = { I_OnReload, I_OnNewServer, I_OnServerQuit, I_OnUserConnect, I_OnPreUserLogoff, I_OnDnsRequest };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
for (unsigned j = 0; j < dns_servers->size(); ++j)
{
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp
index a56d08219..bd837919c 100644
--- a/modules/commands/os_forbid.cpp
+++ b/modules/commands/os_forbid.cpp
@@ -251,8 +251,6 @@ class OSForbid : public Module
forbiddata_type("ForbidData", ForbidData::Unserialize), forbidService(this), commandosforbid(this)
{
- Implementation i[] = { I_OnUserConnect, I_OnUserNickChange, I_OnJoinChannel, I_OnPreCommand };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnUserConnect(User *u, bool &exempt) anope_override
diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp
index 56c784856..60c1bd8bf 100644
--- a/modules/commands/os_ignore.cpp
+++ b/modules/commands/os_ignore.cpp
@@ -320,8 +320,6 @@ class OSIgnore : public Module
ignoredata_type("IgnoreData", IgnoreData::Unserialize), osignoreservice(this), commandosignore(this)
{
- Implementation i[] = { I_OnBotPrivmsg };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) anope_override
diff --git a/modules/commands/os_login.cpp b/modules/commands/os_login.cpp
index 573379236..9d666188a 100644
--- a/modules/commands/os_login.cpp
+++ b/modules/commands/os_login.cpp
@@ -116,7 +116,6 @@ class OSLogin : public Module
commandoslogin(this), commandoslogout(this)
{
- ModuleManager::Attach(I_IsServicesOper, this);
}
~OSLogin()
diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp
index 1d55df843..cb6a9fcfa 100644
--- a/modules/commands/os_news.cpp
+++ b/modules/commands/os_news.cpp
@@ -385,8 +385,6 @@ class OSNews : public Module
OSNews(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
newsitem_type("NewsItem", NewsItem::Unserialize), newsservice(this), commandoslogonnews(this), commandosopernews(this), commandosrandomnews(this)
{
- Implementation i[] = { I_OnUserModeSet, I_OnUserConnect };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnUserModeSet(User *u, const Anope::string &mname) anope_override
diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp
index 239b09a32..171b11c94 100644
--- a/modules/commands/os_noop.cpp
+++ b/modules/commands/os_noop.cpp
@@ -82,7 +82,6 @@ class OSNOOP : public Module
commandosnoop(this)
{
- ModuleManager::Attach(I_OnUserModeSet, this);
}
void OnUserModeSet(User *u, const Anope::string &mname) anope_override
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp
index af6a547f5..9496090db 100644
--- a/modules/commands/os_session.cpp
+++ b/modules/commands/os_session.cpp
@@ -156,7 +156,7 @@ class ExceptionDelCallback : public NumberList
static void DoDel(CommandSource &source, unsigned index)
{
Exception *e = session_service->GetExceptions()[index];
- FOREACH_MOD(I_OnExceptionDel, OnExceptionDel(source, e));
+ FOREACH_MOD(OnExceptionDel, (source, e));
session_service->DelException(e);
delete e;
@@ -360,7 +360,7 @@ class CommandOSException : public Command
exception->expires = expires;
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnExceptionAdd, OnExceptionAdd(exception));
+ FOREACH_RESULT(OnExceptionAdd, MOD_RESULT, (exception));
if (MOD_RESULT == EVENT_STOP)
delete exception;
else
@@ -619,8 +619,6 @@ class OSSession : public Module
{
this->SetPermanent(true);
- Implementation i[] = { I_OnReload, I_OnUserConnect, I_OnUserQuit, I_OnExpireTick };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
ModuleManager::SetPriority(this, PRIORITY_FIRST);
}
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp
index d12237c93..7cd3c12ca 100644
--- a/modules/commands/os_sxline.cpp
+++ b/modules/commands/os_sxline.cpp
@@ -91,7 +91,7 @@ class CommandOSSXLineBase : public Command
return;
}
- FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, x, this->xlm()));
+ FOREACH_MOD(OnDelXLine, (source, x, this->xlm()));
SXLineDelCallback::DoDel(this->xlm(), source, x);
source.Reply(_("\002%s\002 deleted from the %s list."), mask.c_str(), source.command.c_str());
@@ -198,7 +198,7 @@ class CommandOSSXLineBase : public Command
void OnClear(CommandSource &source)
{
- FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, NULL, this->xlm()));
+ FOREACH_MOD(OnDelXLine, (source, NULL, this->xlm()));
for (unsigned i = this->xlm()->GetCount(); i > 0; --i)
{
@@ -370,7 +370,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnAddXLine, OnAddXLine(source, x, this->xlm()));
+ FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, this->xlm()));
if (MOD_RESULT == EVENT_STOP)
{
delete x;
@@ -576,7 +576,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
}
EventReturn MOD_RESULT;
- FOREACH_RESULT(I_OnAddXLine, OnAddXLine(source, x, this->xlm()));
+ FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, this->xlm()));
if (MOD_RESULT == EVENT_STOP)
{
delete x;