]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqloper.cpp
Fix infinite loop on alias expansion, found by Adam
[user/henk/code/inspircd.git] / src / modules / m_sqloper.cpp
index 36bda5c58d468bbc8a69f8eb8ee2d9dfb5c9195f..c4eaa6911000cc14187b490b2e2d3caa6a514e32 100644 (file)
@@ -87,11 +87,10 @@ public:
                return false;
        }
 
-       virtual void OnLoadModule(Module* mod, const std::string& name)
+       virtual void OnLoadModule(Module* mod)
        {
                if (ServerInstance->Modules->ModuleHasInterface(mod, "HashRequest"))
                {
-                       ServerInstance->Logs->Log("m_sqloper",DEBUG, "Post-load registering hasher: %s", name.c_str());
                        std::string sname = HashNameRequest(this, mod).response;
                        hashers[sname.c_str()] = mod;
                        names.push_back(sname);
@@ -150,7 +149,7 @@ public:
                                return false;
 
                        /* Make an MD5 hash of the password for using in the query */
-                       std::string md5_pass_hash = HashRequest(this, x->second, password).result;
+                       std::string md5_pass_hash = HashRequest(this, x->second, password).hex();
 
                        /* We generate our own sum here because some database providers (e.g. SQLite) dont have a builtin md5/sha256 function,
                         * also hashing it in the module and only passing a remote query containing a hash is more secure.
@@ -303,7 +302,7 @@ public:
 
        Version GetVersion()
        {
-               return Version("Allows storage of oper credentials in an SQL table", VF_VENDOR, API_VERSION);
+               return Version("Allows storage of oper credentials in an SQL table", VF_VENDOR);
        }
 
 };