fixed potential threading/socket issue

This commit is contained in:
2020-09-27 00:12:26 -05:00
parent b4fb449e69
commit 062302a7aa
2 changed files with 26 additions and 45 deletions

View File

@@ -227,6 +227,12 @@ void PlayerManager::enterPlayer(CNSocket* sock, CNPacketData* data) {
std::cout << "\tPC_UID: " << plr.PCStyle.iPC_UID << std::endl;
)
// check if account is already in use
if (isAccountInUse(plr.accountId)) {
// kick the other player
exitDuplicate(plr.accountId);
}
response.iID = plr.iID;
response.uiSvrTime = getTime();
response.PCLoadData2CL.iUserLevel = plr.accountLevel;