diff options
author | Vincent <vincent.leung60@gmail.com> | 2014-12-07 21:45:39 +0100 |
---|---|---|
committer | Vincent <vincent.leung60@gmail.com> | 2014-12-07 21:45:39 +0100 |
commit | 83c728fce46498291339fad7d8f065fba237a15d (patch) | |
tree | 2c5e9e6ce84c638115b9f3520aff9b1d4b0c2c32 /src/ClientHandle.cpp | |
parent | changed from using iterator to auto for server and clienthandle (diff) | |
parent | Changed Kick message (diff) | |
download | cuberite-83c728fce46498291339fad7d8f065fba237a15d.tar cuberite-83c728fce46498291339fad7d8f065fba237a15d.tar.gz cuberite-83c728fce46498291339fad7d8f065fba237a15d.tar.bz2 cuberite-83c728fce46498291339fad7d8f065fba237a15d.tar.lz cuberite-83c728fce46498291339fad7d8f065fba237a15d.tar.xz cuberite-83c728fce46498291339fad7d8f065fba237a15d.tar.zst cuberite-83c728fce46498291339fad7d8f065fba237a15d.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 94126d496..3fca48394 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()) @@ -1807,20 +1806,21 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) { if ((item).compare(a_Username) == 0) { - Kick("User already logged in."); + Kick("A player of the username is already logged in"); 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)) { - Kick("User already logged in."); + Kick("A player of the username is already logged in"); } } return true; |