mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-01-28 01:00:06 +00:00
Add config option to disable automatic account creation
Also moved the acceptallcustomnames setting to the login section where it belongs.
This commit is contained in:
@@ -133,8 +133,12 @@ void CNLoginServer::login(CNSocket* sock, CNPacketData* data) {
|
||||
Database::findAccount(&findUser, userLogin);
|
||||
|
||||
// account was not found
|
||||
if (findUser.AccountID == 0)
|
||||
return newAccount(sock, userLogin, userPassword, login->iClientVerC);
|
||||
if (findUser.AccountID == 0) {
|
||||
if (settings::AUTOCREATEACCOUNTS)
|
||||
return newAccount(sock, userLogin, userPassword, login->iClientVerC);
|
||||
|
||||
return loginFail(LoginError::ID_DOESNT_EXIST, userLogin, sock);
|
||||
}
|
||||
|
||||
if (!CNLoginServer::isPasswordCorrect(findUser.Password, userPassword))
|
||||
return loginFail(LoginError::ID_AND_PASSWORD_DO_NOT_MATCH, userLogin, sock);
|
||||
|
||||
Reference in New Issue
Block a user