X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_sqllog.cpp;h=ddcd9e4d21fdf7d27c0fd176f756f69c334643ad;hb=b07868e77c0527642ed72bce84bf5895bf921e87;hp=4f325652446c4a6f3c82f7b0c7093ddcd5c7f7e7;hpb=475f5579b5674a1b14d051bbd5d4400dd811e085;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 4f3256524..ddcd9e4d2 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -182,7 +182,6 @@ public: class ModuleSQLLog : public Module { - ConfigReader* Conf; public: ModuleSQLLog(InspIRCd* Me) @@ -200,6 +199,10 @@ class ModuleSQLLog : public Module OnRehash(NULL,""); MyMod = this; active_queries.clear(); + + Implementation eventlist[] = { I_OnRehash, I_OnOper, I_OnGlobalOper, I_OnKill, + I_OnPreCommand, I_OnUserConnect, I_OnUserQuit, I_OnLoadModule, I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 9); } virtual ~ModuleSQLLog() @@ -208,12 +211,6 @@ class ModuleSQLLog : public Module ServerInstance->Modules->DoneWithInterface("SQLutils"); } - void Implements(char* List) - { - List[I_OnRehash] = List[I_OnOper] = List[I_OnGlobalOper] = List[I_OnKill] = 1; - List[I_OnPreCommand] = List[I_OnUserConnect] = 1; - List[I_OnUserQuit] = List[I_OnLoadModule] = List[I_OnRequest] = 1; - } void ReadConfig() { @@ -226,7 +223,7 @@ class ModuleSQLLog : public Module ReadConfig(); } - virtual char* OnRequest(Request* request) + virtual const char* OnRequest(Request* request) { if(strcmp(SQLRESID, request->GetId()) == 0) { @@ -239,7 +236,6 @@ class ModuleSQLLog : public Module if (n != active_queries.end()) { n->second->Go(res); - std::map::iterator n = active_queries.find(res->id); active_queries.erase(n); } @@ -280,7 +276,7 @@ class ModuleSQLLog : public Module return 0; } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { if ((command == "GLINE" || command == "KLINE" || command == "ELINE" || command == "ZLINE") && validated) { @@ -306,7 +302,7 @@ class ModuleSQLLog : public Module virtual Version GetVersion() { - return Version(1,1,0,1,VF_VENDOR,API_VERSION); + return Version(1,2,0,1,VF_VENDOR,API_VERSION); } };