summaryrefslogtreecommitdiff
path: root/modules/extra
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/extra
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/extra')
-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
14 files changed, 4 insertions, 37 deletions
diff --git a/modules/extra/m_chanstats.cpp b/modules/extra/m_chanstats.cpp
index 3d3430752..9a3c5dfaf 100644
--- a/modules/extra/m_chanstats.cpp
+++ b/modules/extra/m_chanstats.cpp
@@ -336,17 +336,6 @@ class MChanstats : public Module
MChanstats(const Anope::string &modname, const Anope::string &creator) :
Module(modname, creator, EXTRA | VENDOR), sql("", ""), sqlinterface(this)
{
-
- Implementation i[] = { I_OnPrivmsg,
- I_OnPreUserKicked,
- I_OnChannelModeSet,
- I_OnChannelModeUnset,
- I_OnTopicUpdated,
- I_OnDelCore,
- I_OnChangeCoreDisplay,
- I_OnChanDrop,
- I_OnReload};
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/extra/m_httpd.cpp b/modules/extra/m_httpd.cpp
index 212abfa4f..6524a87b5 100644
--- a/modules/extra/m_httpd.cpp
+++ b/modules/extra/m_httpd.cpp
@@ -334,8 +334,6 @@ class HTTPD : public Module
HTTPD(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), sslref("SSLService", "ssl")
{
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
~HTTPD()
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index 17ad60213..61410d274 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -407,8 +407,6 @@ class ModuleLDAP : public Module, public Pipe
{
me = this;
- Implementation i[] = { I_OnReload, I_OnModuleUnload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
~ModuleLDAP()
diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp
index 617929380..d64987ed6 100644
--- a/modules/extra/m_ldap_authentication.cpp
+++ b/modules/extra/m_ldap_authentication.cpp
@@ -103,7 +103,7 @@ class IdentifyInterface : public LDAPInterface
if (na == NULL)
{
na = new NickAlias(ii->req->GetAccount(), new NickCore(ii->req->GetAccount()));
- FOREACH_MOD(I_OnNickRegister, OnNickRegister(ii->user, na));
+ FOREACH_MOD(OnNickRegister, (ii->user, na));
BotInfo *NickServ = Config->GetClient("NickServ");
if (ii->user && NickServ)
ii->user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
@@ -217,8 +217,6 @@ class NSIdentifyLDAP : public Module
me = this;
- Implementation i[] = { I_OnReload, I_OnPreCommand, I_OnCheckAuthentication, I_OnNickIdentify, I_OnNickRegister };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
ModuleManager::SetPriority(this, PRIORITY_FIRST);
}
diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp
index 43ee81408..3e16d75e6 100644
--- a/modules/extra/m_ldap_oper.cpp
+++ b/modules/extra/m_ldap_oper.cpp
@@ -89,8 +89,6 @@ class LDAPOper : public Module
Module(modname, creator, EXTRA | VENDOR), ldap("LDAPProvider", "ldap/main"), iinterface(this)
{
- Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnDelCore };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp
index 8cf12ca79..c42d82ee6 100644
--- a/modules/extra/m_mysql.cpp
+++ b/modules/extra/m_mysql.cpp
@@ -169,8 +169,6 @@ class ModuleSQL : public Module, public Pipe
{
me = this;
- Implementation i[] = { I_OnReload, I_OnModuleUnload };
- ModuleManager::Attach(i, this, 2);
DThread = new DispatcherThread();
DThread->Start();
diff --git a/modules/extra/m_proxyscan.cpp b/modules/extra/m_proxyscan.cpp
index fb5f96758..7f8adb60e 100644
--- a/modules/extra/m_proxyscan.cpp
+++ b/modules/extra/m_proxyscan.cpp
@@ -221,8 +221,6 @@ class ModuleProxyScan : public Module
connectionTimeout(this, 5)
{
- Implementation i[] = { I_OnReload, I_OnUserConnect };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
this->listener = NULL;
}
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp
index 648dc22c2..bbd4e8b23 100644
--- a/modules/extra/m_sql_authentication.cpp
+++ b/modules/extra/m_sql_authentication.cpp
@@ -42,7 +42,7 @@ class SQLAuthenticationResult : public SQL::Interface
if (na == NULL)
{
na = new NickAlias(req->GetAccount(), new NickCore(req->GetAccount()));
- FOREACH_MOD(I_OnNickRegister, OnNickRegister(user, na));
+ FOREACH_MOD(OnNickRegister, (user, na));
if (user && NickServ)
user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
}
@@ -78,8 +78,6 @@ class ModuleSQLAuthentication : public Module
{
me = this;
- Implementation i[] = { I_OnReload, I_OnPreCommand, I_OnCheckAuthentication };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp
index 6f9f05004..772d484c6 100644
--- a/modules/extra/m_sql_oper.cpp
+++ b/modules/extra/m_sql_oper.cpp
@@ -98,8 +98,6 @@ class ModuleSQLOper : public Module
ModuleSQLOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
{
- Implementation i[] = { I_OnReload, I_OnNickIdentify };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(Configuration::Conf *conf) anope_override
diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp
index bea4d8d95..b306ccfcf 100644
--- a/modules/extra/m_sqlite.cpp
+++ b/modules/extra/m_sqlite.cpp
@@ -66,8 +66,6 @@ class ModuleSQLite : public Module
public:
ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
{
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
~ModuleSQLite()
diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp
index 19b0aaf8f..10d1b5807 100644
--- a/modules/extra/m_ssl.cpp
+++ b/modules/extra/m_ssl.cpp
@@ -117,8 +117,6 @@ class SSLModule : public Module
SSL_CTX_set_session_id_context(client_ctx, reinterpret_cast<const unsigned char *>(context_name.c_str()), context_name.length());
SSL_CTX_set_session_id_context(server_ctx, reinterpret_cast<const unsigned char *>(context_name.c_str()), context_name.length());
- ModuleManager::Attach(I_OnReload, this);
- ModuleManager::Attach(I_OnPreServerConnect, this);
}
~SSLModule()
diff --git a/modules/extra/m_xmlrpc.cpp b/modules/extra/m_xmlrpc.cpp
index 66e2db9ac..3c16f997e 100644
--- a/modules/extra/m_xmlrpc.cpp
+++ b/modules/extra/m_xmlrpc.cpp
@@ -168,8 +168,6 @@ class ModuleXMLRPC : public Module
throw ModuleException("Unable to find http reference, is m_httpd loaded?");
httpref->RegisterPage(&xmlrpcinterface);
- Implementation i[] = { I_OnReload };
- ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
~ModuleXMLRPC()
diff --git a/modules/extra/m_xmlrpc_main.cpp b/modules/extra/m_xmlrpc_main.cpp
index b697a2c8c..c1db97603 100644
--- a/modules/extra/m_xmlrpc_main.cpp
+++ b/modules/extra/m_xmlrpc_main.cpp
@@ -117,7 +117,7 @@ class MyXMLRPCEvent : public XMLRPCEvent
else
{
XMLRPCIdentifyRequest *req = new XMLRPCIdentifyRequest(me, request, client, iface, username, password);
- FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
+ FOREACH_MOD(OnCheckAuthentication, (NULL, req));
req->Dispatch();
return false;
}
diff --git a/modules/extra/webcpanel/pages/index.cpp b/modules/extra/webcpanel/pages/index.cpp
index 4449f5f60..51b908b13 100644
--- a/modules/extra/webcpanel/pages/index.cpp
+++ b/modules/extra/webcpanel/pages/index.cpp
@@ -87,7 +87,7 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page
// Rate limit check.
WebpanelRequest *req = new WebpanelRequest(me, reply, message, server, page_name, client, replacements, user, pass);
- FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
+ FOREACH_MOD(OnCheckAuthentication, (NULL, req));
req->Dispatch();
return false;
}