From 9caa3b19c15b257af47a924c68f9b13517447c26 Mon Sep 17 00:00:00 2001 From: vincentleung1 Date: Sat, 29 Nov 2014 15:59:48 -0800 Subject: removed extra space and fixed some formatting in cCallback --- src/ClientHandle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index f63754aab..54a39cdc2 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1790,7 +1790,6 @@ void cClientHandle::HandleKeepAlive(int a_KeepAliveID) bool cClientHandle::HandleHandshake(const AString & a_Username) { - if (!cRoot::Get()->GetPluginManager()->CallHookHandshake(*this, a_Username)) { if (cRoot::Get()->GetServer()->GetNumPlayers() >= cRoot::Get()->GetServer()->GetMaxPlayers()) @@ -1811,11 +1810,12 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) return false; } } - class cCallback : public cPlayerListCallback + class cCallback : + public cPlayerListCallback { virtual bool Item(cPlayer * a_Player) override { - return false; + return true; } } Callback; if (cRoot::Get()->GetDefaultWorld()->DoWithPlayer(a_Username, Callback)) -- cgit v1.2.3 From 438a9b04cbabcbbab06d9f5bd00ced3342eb97f8 Mon Sep 17 00:00:00 2001 From: vincentleung1 Date: Sat, 29 Nov 2014 16:05:22 -0800 Subject: Changed Kick message --- src/ClientHandle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 54a39cdc2..1ffb5f04b 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1806,7 +1806,7 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) { if ((*itr).compare(a_Username) == 0) { - Kick("User already logged in."); + Kick("A player of the username is already logged in"); return false; } } @@ -1820,7 +1820,7 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) } Callback; if (cRoot::Get()->GetDefaultWorld()->DoWithPlayer(a_Username, Callback)) { - Kick("User already logged in."); + Kick("A player of the username is already logged in"); } } return true; -- cgit v1.2.3