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)))
{
return MOD_RES_PASSTHRU;
}
- bool CheckCredentials(User* user)
+ bool CheckCredentials(LocalUser* user)
{
std::string thisquery = freeformquery;
std::string safepass = user->password;
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 */
}
}
- 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);
}
};