]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_pgsql.cpp
Add extra parameter to OnUserPreNotice and OnUserPrePrivmsg, CUList &exempt_list...
[user/henk/code/inspircd.git] / src / modules / extra / m_pgsql.cpp
index b4cba6a7ac3ec8c29950d9e5669b2e02987c7df4..ca74f4223cd8ca225fed2a5b5e67db0f9ef1b263 100644 (file)
@@ -96,7 +96,7 @@ class SQLresolver : public Resolver
        ModulePgSQL* mod;
  public:
        SQLresolver(ModulePgSQL* m, InspIRCd* Instance, const SQLhost& hi)
-       : Resolver(Instance, hi.host, DNS_QUERY_FORWARD), host(hi), mod(m)
+       : Resolver(Instance, hi.host, DNS_QUERY_FORWARD, (Module*)m), host(hi), mod(m)
        {
        }
 
@@ -659,7 +659,7 @@ public:
                
        virtual Version GetVersion()
        {
-               return Version(1, 0, 0, 0, VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
+               return Version(1, 1, 0, 0, VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
        }
        
        virtual ~ModulePgSQL()
@@ -1128,8 +1128,7 @@ SQLerror SQLConn::DoQuery(SQLrequest &req)
 #ifdef PGSQL_HAS_ESCAPECONN
                                                len = PQescapeStringConn(sql, queryend, req.query.p.front().c_str(), req.query.p.front().length(), &error);
 #else
-                                               len = PQescapeStringConn(queryend, req.query.p.front().c_str(), req.query.p.front().length());
-                                               error = 0;
+                                               len = PQescapeString         (queryend, req.query.p.front().c_str(), req.query.p.front().length());
 #endif
                                                if(error)
                                                {
@@ -1168,13 +1167,13 @@ SQLerror SQLConn::DoQuery(SQLrequest &req)
                        {
                                Instance->Log(DEBUG, "Dispatched query successfully");
                                qinprog = true;
-                               DELETE(query);
+                               delete[] query;
                                return SQLerror();
                        }
                        else
                        {
                                Instance->Log(DEBUG, "Failed to dispatch query: %s", PQerrorMessage(sql));
-                               DELETE(query);
+                               delete[] query;
                                return SQLerror(QSEND_FAIL, PQerrorMessage(sql));
                        }
                }