]> 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 1feb3b02b90f7779b96a5383f6101efc57daa894..de8b8f418bf0753449d00ca42338ed2ea4e958d8 100644 (file)
@@ -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;