summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_sqlutils.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-28 22:42:38 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-28 22:42:38 +0000
commit59bd18f2a0b43b71ee32124add9d40d1d3a54919 (patch)
tree2e498ff5e90f890c10a73a38e6d1d3901eb4cc4a /src/modules/extra/m_sqlutils.cpp
parent5dce8782ebea6cfa0525a46819641737214d47d9 (diff)
Change the SQLutils and SQL providers to also use interfaces for proper unload order, taking away the need for a static m_sqlutils. Depend order: m_sqlutils -> sql providers (m_mysql m_pgsql) -> sql modules (m_sqlauth m_sqloper).
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6149 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_sqlutils.cpp')
-rw-r--r--src/modules/extra/m_sqlutils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/extra/m_sqlutils.cpp b/src/modules/extra/m_sqlutils.cpp
index c423246cc..bec8a4450 100644
--- a/src/modules/extra/m_sqlutils.cpp
+++ b/src/modules/extra/m_sqlutils.cpp
@@ -35,8 +35,6 @@ typedef std::list<unsigned long> AssocIdList;
class ModuleSQLutils : public Module
{
private:
-
-
IdUserMap iduser;
IdChanMap idchan;
@@ -44,9 +42,14 @@ public:
ModuleSQLutils(InspIRCd* Me)
: Module::Module(Me)
{
- ServerInstance->Log(DEBUG, "%s 'SQLutils' feature", ServerInstance->PublishFeature("SQLutils", this) ? "Published" : "Couldn't publish");
+ ServerInstance->PublishInterface("SQLutils", this);
}
+ virtual ~ModuleSQLutils()
+ {
+ ServerInstance->UnpublishInterface("SQLutils", this);
+ }
+
void Implements(char* List)
{
List[I_OnChannelDelete] = List[I_OnUnloadModule] = List[I_OnRequest] = List[I_OnUserDisconnect] = 1;
@@ -263,12 +266,9 @@ public:
virtual Version GetVersion()
{
- return Version(1, 1, 0, 0, VF_STATIC|VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
+ return Version(1, 1, 0, 0, VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
}
- virtual ~ModuleSQLutils()
- {
- }
};
class ModuleSQLutilsFactory : public ModuleFactory