summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp10
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;