From d8d3b9aec5bbb0f6d632d86f1fb7b1e8f58e9063 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 00:12:48 -0800 Subject: Moved the check into a new function and just calls that function and a blank FindAndDoWithPlayer added. --- src/ClientHandle.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index f195b6be7..880a404da 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -280,6 +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. */ + bool CheckMultiLogin(void); /** Called when the protocol handshake has been received (for protocol versions that support it; otherwise the first instant when a username is received). Returns true if the player is to be let in, false if they were disconnected -- cgit v1.2.3 From 6de07d4a39096f19c075695824aa87a1907e4edc Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 00:45:29 -0800 Subject: Fixed compile errors --- src/ClientHandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 880a404da..add004bd5 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -281,7 +281,7 @@ public: void HandleEntitySprinting (int a_EntityID, bool a_IsSprinting); /** Kicks the current player if the same username is already logged in. */ - bool CheckMultiLogin(void); + bool CheckMultiLogin(const AString & a_Username); /** Called when the protocol handshake has been received (for protocol versions that support it; otherwise the first instant when a username is received). Returns true if the player is to be let in, false if they were disconnected -- cgit v1.2.3 From 12c012fa01e719c7c103e36ae0407294a0d11bfb Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 14:33:59 -0800 Subject: Changed CheckMultiLogin() to not have main body wrapped in an if statement. Added in indent to cPlayerListCallBack in cCallback class inside CheckMultiLogin(). Added doxy-comment for DoWithPlayer(). Changed comments on IsPlayerInQueue() and IsAllowMultiLogin() to doxy-comments. --- src/ClientHandle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index add004bd5..cd63aa308 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -282,6 +282,7 @@ public: /** Kicks the current player if the same username is already logged in. */ bool CheckMultiLogin(const AString & a_Username); + /** Called when the protocol handshake has been received (for protocol versions that support it; otherwise the first instant when a username is received). Returns true if the player is to be let in, false if they were disconnected -- cgit v1.2.3 From 4b08ca261bed5ec2fd70f64ee96104ba6bee6927 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 9 Dec 2014 03:06:25 -0800 Subject: Fixed indent problems and added return definitions to CheckMultiLogin(). Changed from IsAllowMultiLogin() to DoesAllowMultiLogin(). Fixed CheckMultiLogin() to not run to the end without returning a value. --- src/ClientHandle.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ClientHandle.h') 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; -- cgit v1.2.3