summaryrefslogtreecommitdiff
path: root/modules
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
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')
-rw-r--r--modules/bs_autoassign.cpp2
-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
-rw-r--r--modules/cs_statusupdate.cpp2
-rw-r--r--modules/database/db_flatfile.cpp2
-rw-r--r--modules/database/db_old.cpp2
-rw-r--r--modules/database/db_plain.cpp15
-rw-r--r--modules/database/db_redis.cpp2
-rw-r--r--modules/database/db_sql.cpp2
-rw-r--r--modules/database/db_sql_live.cpp2
-rw-r--r--modules/encryption/enc_md5.cpp2
-rw-r--r--modules/encryption/enc_none.cpp2
-rw-r--r--modules/encryption/enc_old.cpp2
-rw-r--r--modules/encryption/enc_sha1.cpp2
-rw-r--r--modules/encryption/enc_sha256.cpp2
-rw-r--r--modules/extra/m_chanstats.cpp11
-rw-r--r--modules/extra/m_httpd.cpp2
-rw-r--r--modules/extra/m_ldap.cpp2
-rw-r--r--modules/extra/m_ldap_authentication.cpp4
-rw-r--r--modules/extra/m_ldap_oper.cpp2
-rw-r--r--modules/extra/m_mysql.cpp2
-rw-r--r--modules/extra/m_proxyscan.cpp2
-rw-r--r--modules/extra/m_sql_authentication.cpp4
-rw-r--r--modules/extra/m_sql_oper.cpp2
-rw-r--r--modules/extra/m_sqlite.cpp2
-rw-r--r--modules/extra/m_ssl.cpp2
-rw-r--r--modules/extra/m_xmlrpc.cpp2
-rw-r--r--modules/extra/m_xmlrpc_main.cpp2
-rw-r--r--modules/extra/webcpanel/pages/index.cpp2
-rw-r--r--modules/m_dns.cpp4
-rw-r--r--modules/m_dnsbl.cpp2
-rw-r--r--modules/m_helpchan.cpp2
-rw-r--r--modules/m_redis.cpp2
-rw-r--r--modules/m_rewrite.cpp2
-rw-r--r--modules/protocol/bahamut.cpp1
-rw-r--r--modules/protocol/charybdis.cpp6
-rw-r--r--modules/protocol/hybrid.cpp1
-rw-r--r--modules/protocol/inspircd12.cpp4
-rw-r--r--modules/protocol/inspircd20.cpp4
-rw-r--r--modules/protocol/ngircd.cpp2
-rw-r--r--modules/protocol/plexus.cpp2
-rw-r--r--modules/protocol/unreal.cpp4
-rw-r--r--modules/pseudoclients/botserv.cpp11
-rw-r--r--modules/pseudoclients/chanserv.cpp9
-rw-r--r--modules/pseudoclients/global.cpp2
-rw-r--r--modules/pseudoclients/hostserv.cpp5
-rw-r--r--modules/pseudoclients/memoserv.cpp4
-rw-r--r--modules/pseudoclients/nickserv.cpp10
-rw-r--r--modules/pseudoclients/operserv.cpp2
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 =