]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_sqlite3.cpp
Fix STARTTLS sending the 670 numeric within the SSL session, not prior to it
[user/henk/code/inspircd.git] / src / modules / extra / m_sqlite3.cpp
index 89f61b6523037434ea6d2423c5b1680604d8a79c..e97e884ea4fc62c3cda7606b034274349c4f059b 100644 (file)
@@ -2,7 +2,7 @@
  *              | Inspire Internet Relay Chat Daemon |
  *              +------------------------------------+
  *
- *     InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *     InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -31,7 +31,7 @@ typedef std::map<std::string, SQLConn*> ConnMap;
 typedef std::deque<classbase*> paramlist;
 typedef std::deque<SQLite3Result*> ResultQueue;
 
-unsigned long count(const char * const str, char a)
+static unsigned long count(const char * const str, char a)
 {
        unsigned long n = 0;
        for (const char *p = str; *p; ++p)
@@ -446,21 +446,15 @@ class ModuleSQLite3 : public Module
  private:
        ConnMap connections;
        unsigned long currid;
+       ServiceProvider sqlserv;
 
  public:
        ModuleSQLite3()
-       : currid(0)
+       : currid(0), sqlserv(this, "SQL/sqlite", SERVICE_DATA)
        {
-               ServerInstance->Modules->UseInterface("SQLutils");
-
-               if (!ServerInstance->Modules->PublishFeature("SQL", this))
-               {
-                       throw ModuleException("m_sqlite3: Unable to publish feature 'SQL'");
-               }
 
                ReadConf();
 
-               ServerInstance->Modules->PublishInterface("SQL", this);
                Implementation eventlist[] = { I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
@@ -469,10 +463,6 @@ class ModuleSQLite3 : public Module
        {
                ClearQueue();
                ClearAllConnections();
-
-               ServerInstance->Modules->UnpublishInterface("SQL", this);
-               ServerInstance->Modules->UnpublishFeature("SQL");
-               ServerInstance->Modules->DoneWithInterface("SQLutils");
        }
 
        void ClearQueue()