mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-19 16:31:29 +00:00
Update client [skip ci]
This commit is contained in:
parent
0c2d26579a
commit
0111e9a5d0
@ -637,21 +637,20 @@ void Client::DoSuccessfulLogin(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param user
|
* @param username
|
||||||
* @param pass
|
* @param password
|
||||||
*/
|
*/
|
||||||
void Client::CreateLocalAccount(const std::string &user, const std::string &pass)
|
void Client::CreateLocalAccount(const std::string &username, const std::string &password)
|
||||||
{
|
{
|
||||||
auto mode = server.options.GetEncryptionMode();
|
auto mode = server.options.GetEncryptionMode();
|
||||||
auto hash = eqcrypt_hash(user, pass, mode);
|
auto hash = eqcrypt_hash(username, password, mode);
|
||||||
|
|
||||||
unsigned int db_id = 0;
|
unsigned int db_id = 0;
|
||||||
std::string db_login = server.options.GetDefaultLoginServerName();
|
if (!server.db->CreateLoginData(username, hash, "local", db_id)) {
|
||||||
if (!server.db->CreateLoginData(user, hash, db_login, db_id)) {
|
|
||||||
DoFailedLogin();
|
DoFailedLogin();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DoSuccessfulLogin(user, db_id, db_login);
|
DoSuccessfulLogin(username, db_id, "local");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user