]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_sqllog.cpp
Fix memory leak if we send STARTTLS twice, thanks special and psychon
[user/henk/code/inspircd.git] / src / modules / extra / m_sqllog.cpp
index cc63a73d6210645b3b2bcb521f1538e1eb35e58d..16746f69001b66ccfeb5bee47ccdb858f480b6f2 100644 (file)
@@ -182,7 +182,6 @@ public:
 
 class ModuleSQLLog : public Module
 {
-       ConfigReader* Conf;
 
  public:
        ModuleSQLLog(InspIRCd* Me)
@@ -224,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)
                {
@@ -237,7 +236,6 @@ class ModuleSQLLog : public Module
                        if (n != active_queries.end())
                        {
                                n->second->Go(res);
-                               std::map<unsigned long, QueryInfo*>::iterator n = active_queries.find(res->id);
                                active_queries.erase(n);
                        }
 
@@ -278,11 +276,11 @@ 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 std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
        {
                if ((command == "GLINE" || command == "KLINE" || command == "ELINE" || command == "ZLINE") && validated)
                {
-                       AddLogEntry(LT_XLINE,user->nick,command[0]+std::string(":")+std::string(parameters[0]),user->server);
+                       AddLogEntry(LT_XLINE,user->nick,command[0]+std::string(":")+parameters[0],user->server);
                }
                return 0;
        }
@@ -304,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);
        }
        
 };