diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-21 14:22:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-21 14:22:21 +0000 |
commit | dc4339dbde226231426cc51b3853a97a42d184d8 (patch) | |
tree | 3c2d2060f3a07b6d298bc48580ae3a1161a850de /src/modules/extra/m_sql.cpp | |
parent | d0668060caacf00939fd0b92bf7f3fb84c42fdbe (diff) |
Added m_sqlauth - allows authorizing of connections via an arbitary mysql table with a username and password field
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1156 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_sql.cpp')
-rw-r--r-- | src/modules/extra/m_sql.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/modules/extra/m_sql.cpp b/src/modules/extra/m_sql.cpp index 1b7862281..5d8eef332 100644 --- a/src/modules/extra/m_sql.cpp +++ b/src/modules/extra/m_sql.cpp @@ -70,9 +70,7 @@ class SQLConnection // multiple rows. bool QueryResult(std::string query) { - char escaped_query[query.length()+1]; - mysql_real_escape_string(&connection, escaped_query, query.c_str(), query.length()); - int r = mysql_query(&connection, escaped_query); + int r = mysql_query(&connection, query.c_str()); if (!r) { res = mysql_use_result(&connection); @@ -84,9 +82,7 @@ class SQLConnection // the number of effected rows is returned in the return value. unsigned long QueryCount(std::string query) { - char escaped_query[query.length()+1]; - mysql_real_escape_string(&connection, escaped_query, query.c_str(), query.length()); - int r = mysql_query(&connection, escaped_query); + int r = mysql_query(&connection, query.c_str()); if (!r) { res = mysql_store_result(&connection); |