summaryrefslogtreecommitdiff
path: root/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra')
-rw-r--r--modules/extra/ldap.h4
-rw-r--r--modules/extra/m_ldap.cpp7
-rw-r--r--modules/extra/m_mysql.cpp1
-rw-r--r--modules/extra/m_ssl.cpp1
-rw-r--r--modules/extra/m_xmlrpc.cpp1
-rw-r--r--modules/extra/sql.h4
-rw-r--r--modules/extra/ssl.h4
-rw-r--r--modules/extra/xmlrpc.h4
8 files changed, 8 insertions, 18 deletions
diff --git a/modules/extra/ldap.h b/modules/extra/ldap.h
index 6fbba7c11..7ac0d545f 100644
--- a/modules/extra/ldap.h
+++ b/modules/extra/ldap.h
@@ -111,10 +111,10 @@ class LDAPInterface
virtual void OnError(const LDAPResult &err) { }
};
-class LDAPProvider : public Service
+class LDAPProvider : public Service<LDAPProvider>
{
public:
- LDAPProvider(Module *c, const Anope::string &n) : Service(c, n) { }
+ LDAPProvider(Module *c, const Anope::string &n) : Service<LDAPProvider>(c, n) { }
/** Attempt to bind to the LDAP server as an admin
* @param i The LDAPInterface the result is sent to
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index 2be07ff05..e1e58417c 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -328,12 +328,6 @@ class LDAPService : public LDAPProvider, public Thread, public Condition
me->Notify();
}
}
-
- void SetExitState()
- {
- ModuleManager::UnregisterService(this);
- Thread::SetExitState();
- }
};
class ModuleLDAP : public Module, public Pipe
@@ -407,7 +401,6 @@ class ModuleLDAP : public Module, public Pipe
{
LDAPService *ss = new LDAPService(this, connname, server, port, admin_binddn, admin_password);
this->LDAPServices.insert(std::make_pair(connname, ss));
- ModuleManager::RegisterService(ss);
Log(LOG_NORMAL, "ldap") << "LDAP: Successfully connected to server " << connname << " (" << server << ")";
}
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp
index 4e0111bfd..501e3fdff 100644
--- a/modules/extra/m_mysql.cpp
+++ b/modules/extra/m_mysql.cpp
@@ -225,7 +225,6 @@ class ModuleSQL : public Module, public Pipe
{
MySQLService *ss = new MySQLService(this, connname, database, server, user, password, port);
this->MySQLServices.insert(std::make_pair(connname, ss));
- ModuleManager::RegisterService(ss);
Log(LOG_NORMAL, "mysql") << "MySQL: Successfully connected to server " << connname << " (" << server << ")";
}
diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp
index 5143d964a..2d89c078d 100644
--- a/modules/extra/m_ssl.cpp
+++ b/modules/extra/m_ssl.cpp
@@ -149,7 +149,6 @@ class SSLModule : public Module
SSL_CTX_set_verify(client_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, SSLModule::AlwaysAccept);
SSL_CTX_set_verify(server_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, SSLModule::AlwaysAccept);
- ModuleManager::RegisterService(&this->service);
ModuleManager::Attach(I_OnPreServerConnect, this);
}
diff --git a/modules/extra/m_xmlrpc.cpp b/modules/extra/m_xmlrpc.cpp
index 38a733c7c..5a5556822 100644
--- a/modules/extra/m_xmlrpc.cpp
+++ b/modules/extra/m_xmlrpc.cpp
@@ -229,7 +229,6 @@ class ModuleXMLRPC : public Module
{
me = this;
- ModuleManager::RegisterService(&this->xmlrpcinterface);
Implementation i[] = { I_OnReload };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
diff --git a/modules/extra/sql.h b/modules/extra/sql.h
index 5f9b8993d..bc7267ce0 100644
--- a/modules/extra/sql.h
+++ b/modules/extra/sql.h
@@ -108,10 +108,10 @@ class SQLInterface
/** Class providing the SQL service, modules call this to execute queries
*/
-class SQLProvider : public Service
+class SQLProvider : public Service<SQLProvider>
{
public:
- SQLProvider(Module *c, const Anope::string &n) : Service(c, n) { }
+ SQLProvider(Module *c, const Anope::string &n) : Service<SQLProvider>(c, n) { }
virtual void Run(SQLInterface *i, const SQLQuery &query) = 0;
diff --git a/modules/extra/ssl.h b/modules/extra/ssl.h
index e25251379..8261e4705 100644
--- a/modules/extra/ssl.h
+++ b/modules/extra/ssl.h
@@ -1,8 +1,8 @@
-class SSLService : public Service
+class SSLService : public Service<SSLService>
{
public:
- SSLService(Module *o, const Anope::string &n) : Service(o, n) { }
+ SSLService(Module *o, const Anope::string &n) : Service<SSLService>(o, n) { }
virtual void Init(Socket *s) = 0;
};
diff --git a/modules/extra/xmlrpc.h b/modules/extra/xmlrpc.h
index 364617ecc..3a5c05332 100644
--- a/modules/extra/xmlrpc.h
+++ b/modules/extra/xmlrpc.h
@@ -55,10 +55,10 @@ class XMLRPCEvent
virtual void Run(XMLRPCServiceInterface *iface, XMLRPCClientSocket *source, XMLRPCRequest *request) = 0;
};
-class XMLRPCServiceInterface : public Service
+class XMLRPCServiceInterface : public Service<XMLRPCServiceInterface>
{
public:
- XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, sname) { }
+ XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service<XMLRPCServiceInterface>(creator, sname) { }
virtual void Register(XMLRPCEvent *event) = 0;