]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_sqlite3.cpp
How about we make this compile?
[user/henk/code/inspircd.git] / src / modules / extra / m_sqlite3.cpp
index c4d1cc799ef98ea8195b023cdcbed7f376c80cac..354f95a5b4021cdf716aa9c24c29a4199767359c 100644 (file)
@@ -3,7 +3,7 @@
  *              +------------------------------------+
  *
  *     InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *                       the file COPYING for details.
@@ -306,9 +306,6 @@ class SQLConn : public classbase
                /* Total length of the unescaped parameters */
                unsigned long maxparamlen, paramcount;
 
-               /* Total length of query, used for binary-safety */
-               unsigned long querylength = 0;
-
                /* The length of the longest parameter */
                maxparamlen = 0;
 
@@ -404,7 +401,6 @@ class SQLConn : public classbase
                                *queryend = req.query.q[i];
                                queryend++;
                        }
-                       querylength++;
                }
                *queryend = 0;
                req.query.q = query;
@@ -458,7 +454,7 @@ class SQLConn : public classbase
 
        int OpenDB()
        {
-               return sqlite3_open(host.host.c_str(), &conn);
+               return sqlite3_open_v2(host.host.c_str(), &conn, SQLITE_OPEN_READWRITE, 0);
        }
 
        void CloseDB()