Changed HandleHandshake to return the result of CheckMultiLogin instead of just true since it already returns true if it finds and kicks the current player.
This commit is contained in:
parent
d8d3b9aec5
commit
ed09e76023
@ -1789,6 +1789,8 @@ void cClientHandle::HandleKeepAlive(int a_KeepAliveID)
|
||||
|
||||
|
||||
bool cClientHandle::CheckMultiLogin(void)
|
||||
{
|
||||
if (!(cRoot::Get()->GetServer()->IsAllowMultiLogin()))
|
||||
{
|
||||
std::list<AString> usernamesServer = cRoot::Get()->GetServer()->GetUsernames();
|
||||
|
||||
@ -1815,6 +1817,7 @@ bool cClientHandle::CheckMultiLogin(void)
|
||||
Kick("A player of the username is already logged in");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1834,12 +1837,8 @@ bool cClientHandle::HandleHandshake(const AString & a_Username)
|
||||
}
|
||||
}
|
||||
|
||||
if (!(cRoot::Get()->GetServer()->IsAllowMultiLogin()))
|
||||
{
|
||||
return CheckMultiLogin();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user