HashRequest hash(creator, x->second, stuff);
/* Now attempt to generate a hash */
user->WriteServ("NOTICE %s :%s hashed password for %s is %s",
- user->nick.c_str(), algo, stuff, hash.result.c_str());
+ user->nick.c_str(), algo, stuff, hash.hex().c_str());
}
else if (names.empty())
{
}
- virtual void OnLoadModule(Module* mod, const std::string& name)
+ virtual void OnLoadModule(Module* mod)
{
if (ServerInstance->Modules->ModuleHasInterface(mod, "HashRequest"))
{
- ServerInstance->Logs->Log("m_password-hash",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);
if (x != hashers.end())
{
/* Compare the hash in the config to the generated hash */
- if (!strcasecmp(data.c_str(), HashRequest(this, x->second, input).result.c_str()))
+ if (!strcasecmp(data.c_str(), HashRequest(this, x->second, input).hex().c_str()))
return MOD_RES_ALLOW;
/* No match, and must be hashed, forbid */
else
virtual Version GetVersion()
{
- return Version("Allows for hashed oper passwords",VF_VENDOR,API_VERSION);
+ return Version("Allows for hashed oper passwords",VF_VENDOR);
}
};