summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-06 18:24:45 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-06 18:24:45 +0000
commitbee75f416868a1041e8853a6a5a7e818f0300acb (patch)
tree1a98f11a930eb38ccc7aca85ea8440dee54c9814
parentcb0fcc235bf12b80af22088997b7f5a9a605109f (diff)
Add query debug output to m_sqlauth
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12605 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_sqlauth.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp
index df2dd0190..1494a5634 100644
--- a/src/modules/m_sqlauth.cpp
+++ b/src/modules/m_sqlauth.cpp
@@ -30,7 +30,10 @@ class AuthQuery : public SQLQuery
LocalIntExt& pendingExt;
bool verbose;
AuthQuery(Module* me, const std::string& db, const std::string& q, const std::string& u, LocalIntExt& e, bool v)
- : SQLQuery(me, db, q), uid(u), pendingExt(e), verbose(v) {}
+ : SQLQuery(me, db, q), uid(u), pendingExt(e), verbose(v)
+ {
+ ServerInstance->Logs->Log("m_sqlauth",DEBUG, "SQLAUTH: db=%s query=\"%s\"", db.c_str(), q.c_str());
+ }
void OnResult(SQLResult& res)
{
@@ -127,7 +130,7 @@ class ModuleSQLAuth : public Module
HashProvider* sha256 = ServerInstance->Modules->FindDataService<HashProvider>("hash/sha256");
if (sha256)
- userinfo["$sha256pass"] = sha256->hexsum(user->password);
+ userinfo["sha256pass"] = sha256->hexsum(user->password);
SQL->submit(new AuthQuery(this, databaseid, SQL->FormatQuery(freeformquery, userinfo), user->uuid, pendingExt, verbose));