]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_sqlite3.cpp
Change allocation of InspIRCd::Timers to be physically part of the object containing it
[user/henk/code/inspircd.git] / src / modules / extra / m_sqlite3.cpp
index 4cc76ef8c6d69d36b24775aba43629a1036f7662..1c213e8e074550ca2b8d1b2d8287eb1fb1845109 100644 (file)
@@ -28,9 +28,8 @@
 # pragma comment(lib, "sqlite3.lib")
 #endif
 
-/* $CompileFlags: pkgconfversion("sqlite3","3.3") pkgconfincludes("sqlite3","/sqlite3.h","") */
+/* $CompileFlags: pkgconfversion("sqlite3","3.3") pkgconfincludes("sqlite3","/sqlite3.h","") -Wno-pedantic */
 /* $LinkerFlags: pkgconflibs("sqlite3","/libsqlite3.so","-lsqlite3") */
-/* $NoPedantic */
 
 class SQLConn;
 typedef std::map<std::string, SQLConn*> ConnMap;
@@ -84,7 +83,7 @@ class SQLConn : public SQLProvider
                std::string host = tag->getString("hostname");
                if (sqlite3_open_v2(host.c_str(), &conn, SQLITE_OPEN_READWRITE, 0) != SQLITE_OK)
                {
-                       ServerInstance->Logs->Log("m_sqlite3", LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
+                       ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
                        conn = NULL;
                }
        }
@@ -203,14 +202,6 @@ class ModuleSQLite3 : public Module
        ConnMap conns;
 
  public:
-       void init() CXX11_OVERRIDE
-       {
-               ReadConf();
-
-               Implementation eventlist[] = { I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-       }
-
        ~ModuleSQLite3()
        {
                ClearConns();
@@ -227,7 +218,7 @@ class ModuleSQLite3 : public Module
                conns.clear();
        }
 
-       void ReadConf()
+       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                ClearConns();
                ConfigTagList tags = ServerInstance->Config->ConfTags("database");
@@ -241,11 +232,6 @@ class ModuleSQLite3 : public Module
                }
        }
 
-       void OnRehash(User* user) CXX11_OVERRIDE
-       {
-               ReadConf();
-       }
-
        Version GetVersion() CXX11_OVERRIDE
        {
                return Version("sqlite3 provider", VF_VENDOR);