]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqlauth.cpp
Merge pull request #1361 from genius3000/master+rline_IP
[user/henk/code/inspircd.git] / src / modules / m_sqlauth.cpp
index 1ffb3305a860df0442330b318d9537d54c8a17a9..1a5b68dd9206ee0f0d1e6a967bca418d4ecfaa6d 100644 (file)
@@ -78,7 +78,9 @@ class ModuleSQLAuth : public Module
        bool verbose;
 
  public:
-       ModuleSQLAuth() : pendingExt("sqlauth-wait", this), SQL(this, "SQL")
+       ModuleSQLAuth()
+               : pendingExt("sqlauth-wait", ExtensionItem::EXT_USER, this)
+               , SQL(this, "SQL")
        {
        }
 
@@ -124,11 +126,11 @@ class ModuleSQLAuth : public Module
 
                HashProvider* md5 = ServerInstance->Modules->FindDataService<HashProvider>("hash/md5");
                if (md5)
-                       userinfo["md5pass"] = md5->hexsum(user->password);
+                       userinfo["md5pass"] = md5->Generate(user->password);
 
                HashProvider* sha256 = ServerInstance->Modules->FindDataService<HashProvider>("hash/sha256");
                if (sha256)
-                       userinfo["sha256pass"] = sha256->hexsum(user->password);
+                       userinfo["sha256pass"] = sha256->Generate(user->password);
 
                const std::string certfp = SSLClientCert::GetFingerprint(&user->eh);
                userinfo["certfp"] = certfp;