]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqlauth.cpp
Fixes found by removing User inheritance from StreamSocket
[user/henk/code/inspircd.git] / src / modules / m_sqlauth.cpp
index aefd54ef7759acc3b52d48c82371dc2fcedcfcdd..3a446148036a9c8ea30b63c3e9dfee22cc869d08 100644 (file)
@@ -69,7 +69,7 @@ public:
                verbose         = Conf.ReadFlag("sqlauth", "verbose", 0);               /* Set to true if failed connects should be reported to operators */
        }
 
-       ModResult OnUserRegister(User* user)
+       ModResult OnUserRegister(LocalUser* user)
        {
                if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern)))
                {
@@ -85,7 +85,7 @@ public:
                return MOD_RES_PASSTHRU;
        }
 
-       bool CheckCredentials(User* user)
+       bool CheckCredentials(LocalUser* user)
        {
                std::string thisquery = freeformquery;
                std::string safepass = user->password;
@@ -109,14 +109,14 @@ public:
 
                if (HashMod)
                {
-                       SearchAndReplace(thisquery, std::string("$md5pass"), HashRequest(this, HashMod, user->password).result);
+                       SearchAndReplace(thisquery, std::string("$md5pass"), HashRequest(this, HashMod, user->password).hex());
                }
 
                HashMod = ServerInstance->Modules->Find("m_sha256.so");
 
                if (HashMod)
                {
-                       SearchAndReplace(thisquery, std::string("$sha256pass"), HashRequest(this, HashMod, user->password).result);
+                       SearchAndReplace(thisquery, std::string("$sha256pass"), HashRequest(this, HashMod, user->password).hex());
                }
 
                /* Build the query */
@@ -176,14 +176,14 @@ public:
                }
        }
 
-       ModResult OnCheckReady(User* user)
+       ModResult OnCheckReady(LocalUser* user)
        {
                return sqlAuthed.get(user) ? MOD_RES_PASSTHRU : MOD_RES_DENY;
        }
 
        Version GetVersion()
        {
-               return Version("Allow/Deny connections based upon an arbitary SQL table", VF_VENDOR, API_VERSION);
+               return Version("Allow/Deny connections based upon an arbitary SQL table", VF_VENDOR);
        }
 
 };