diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ClientHandle.cpp | 6 | ||||
-rw-r--r-- | src/ClientHandle.h | 3 | ||||
-rw-r--r-- | src/Server.h | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 3bc17d1a9..6812c06ac 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1799,8 +1799,8 @@ bool cClientHandle::CheckMultiLogin(const AString & a_Username) // Check if the player is waiting to be transferred to the World. if (cRoot::Get()->GetServer()->IsPlayerInQueue(a_Username)) { - Kick("A player of the username is already logged in"); - return false; + Kick("A player of the username is already logged in"); + return false; } class cCallback : @@ -1816,8 +1816,8 @@ bool cClientHandle::CheckMultiLogin(const AString & a_Username) if (cRoot::Get()->DoWithPlayer(a_Username, Callback)) { Kick("A player of the username is already logged in"); - return false; } + return false; } diff --git a/src/ClientHandle.h b/src/ClientHandle.h index cd63aa308..b3aec86f6 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -280,7 +280,8 @@ public: void HandleEntityLeaveBed (int a_EntityID); void HandleEntitySprinting (int a_EntityID, bool a_IsSprinting); - /** Kicks the current player if the same username is already logged in. */ + /** Kicks the current player if the same username is already logged in. + Returns false if a player has been kicked, true otherwise. */ bool CheckMultiLogin(const AString & a_Username); /** Called when the protocol handshake has been received (for protocol versions that support it; diff --git a/src/Server.h b/src/Server.h index a93e8df75..39a5a1a71 100644 --- a/src/Server.h +++ b/src/Server.h @@ -68,12 +68,12 @@ public: // tolua_export void SetMaxPlayers(int a_MaxPlayers) { m_MaxPlayers = a_MaxPlayers; } /** Check if the player is queued to be transferred to a World. - Returns true is Player is found in queue. */ + Returns true is Player is found in queue. */ bool IsPlayerInQueue(AString a_Username); /** Can login more than once with same username. - Returns false if it is not allowed, true otherwise. */ - bool IsAllowMultiLogin(void) { return m_bAllowMultiLogin; } + Returns false if it is not allowed, true otherwise. */ + bool DoesAllowMultiLogin(void) { return m_bAllowMultiLogin; } // Hardcore mode or not: bool IsHardcore(void) const { return m_bIsHardcore; } |