]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_mysql.cpp
Update this to use the new oper call
[user/henk/code/inspircd.git] / src / modules / extra / m_mysql.cpp
index 485c5542dac5bf1ed4bf949643b8b20cc67f0cc6..de8b8f418bf0753449d00ca42338ed2ea4e958d8 100644 (file)
@@ -22,7 +22,7 @@
 /* VERSION 2 API: With nonblocking (threaded) requests */
 
 /* $ModDesc: SQL Service Provider module for all other m_sql* modules */
-/* $CompileFlags: -Wno-variadic-macros exec("mysql_config --include") */
+/* $CompileFlags: exec("mysql_config --include") */
 /* $LinkerFlags: exec("mysql_config --libs_r") rpath("mysql_config --libs_r") */
 /* $ModDep: m_sqlv2.h */
 /* $NoPedantic */
@@ -512,7 +512,7 @@ void ClearOldConnections(ConfigReader* conf)
        {
                if (!HostInConf(conf, i->second->GetConfHost()))
                {
-                       DELETE(i->second);
+                       delete i->second;
                        safei = i;
                        --i;
                        Connections.erase(safei);
@@ -526,7 +526,7 @@ void ClearAllConnections()
        while ((i = Connections.begin()) != Connections.end())
        {
                Connections.erase(i);
-               DELETE(i->second);
+               delete i->second;
        }
 }
 
@@ -739,6 +739,8 @@ class ModuleSQL : public Module
                }
 
                ServerInstance->Modules->PublishInterface("SQL", this);
+               Implementation eventlist[] = { I_OnRehash, I_OnRequest };
+               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
        virtual ~ModuleSQL()
@@ -752,10 +754,6 @@ class ModuleSQL : public Module
        }
 
 
-       void Implements(char* List)
-       {
-               List[I_OnRehash] = List[I_OnRequest] = 1;
-       }
 
        unsigned long NewID()
        {
@@ -880,7 +878,7 @@ void* DispatcherThread(void* arg)
                        /* XXX: Unlock */
                }
 
-               usleep(50);
+               usleep(1000);
        }
 
        return NULL;