]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_password_hash.cpp
core_hostname_lookup: find answer record of the correct type instead of assuming...
[user/henk/code/inspircd.git] / src / modules / m_password_hash.cpp
index 3cdd2b3ced385357ae5e1a9c2465e47de7665b0a..09cdbb402c180dd15e95cf15aabb75458f14af1d 100644 (file)
@@ -36,7 +36,7 @@ class CommandMkpasswd : public Command
        {
                if (!algo.compare(0, 5, "hmac-", 5))
                {
-                       std::string type = algo.substr(5);
+                       std::string type(algo, 5);
                        HashProvider* hp = ServerInstance->Modules->FindDataService<HashProvider>("hash/" + type);
                        if (!hp)
                        {
@@ -91,7 +91,7 @@ class ModuleOperHash : public Module
        {
                if (!hashtype.compare(0, 5, "hmac-", 5))
                {
-                       std::string type = hashtype.substr(5);
+                       std::string type(hashtype, 5);
                        HashProvider* hp = ServerInstance->Modules->FindDataService<HashProvider>("hash/" + type);
                        if (!hp)
                                return MOD_RES_PASSTHRU;