summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-01-23 17:42:52 +0100
committerMattes D <github@xoft.cz>2017-01-28 10:31:04 +0100
commit6b0c7956559f895e23367f4f1a2db3ca8a1850ea (patch)
treeb11a5d9766f50ea70477d9bae3f68ceb8e09d074 /src/ClientHandle.cpp
parentMerge pull request #3564 from cuberite/luacheck (diff)
downloadcuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.tar
cuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.tar.gz
cuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.tar.bz2
cuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.tar.lz
cuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.tar.xz
cuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.tar.zst
cuberite-6b0c7956559f895e23367f4f1a2db3ca8a1850ea.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 0d6655693..f82166820 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -680,7 +680,7 @@ void cClientHandle::HandlePing(void)
-bool cClientHandle::HandleLogin(UInt32 a_ProtocolVersion, const AString & a_Username)
+bool cClientHandle::HandleLogin(const AString & a_Username)
{
{
cCSLock lock(m_CSState);
@@ -696,16 +696,10 @@ bool cClientHandle::HandleLogin(UInt32 a_ProtocolVersion, const AString & a_User
// LOGD("Handling login for client %s @ %s (%p), state = %d", a_Username.c_str(), m_IPString.c_str(), static_cast<void *>(this), m_State.load());
- // If the protocol version hasn't been set yet, set it now:
- if (m_ProtocolVersion == 0)
- {
- m_ProtocolVersion = a_ProtocolVersion;
- }
-
m_Username = a_Username;
// Let the plugins know about this event, they may refuse the player:
- if (cRoot::Get()->GetPluginManager()->CallHookLogin(*this, a_ProtocolVersion, a_Username))
+ if (cRoot::Get()->GetPluginManager()->CallHookLogin(*this, m_ProtocolVersion, a_Username))
{
Destroy();
return false;