summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-08 13:36:54 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-08 13:36:54 +0100
commit32880153ab76830311d8a1db3a157cd5ac6e5d9c (patch)
treec7c77a8c5b6bf86f3f18655e8ec976c30a5c8c15 /source/cClientHandle.cpp
parentcSocketThreads plugged in for cClientHandle reading. Sending still kept the old way. Please help me test this commit thoroughly, this is a change that can break on subtleties. (diff)
downloadcuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.gz
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.bz2
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.lz
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.xz
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.zst
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.zip
Diffstat (limited to '')
-rw-r--r--source/cClientHandle.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 898e04e72..1019f26c6 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -221,14 +221,14 @@ cClientHandle::~cClientHandle()
void cClientHandle::Destroy()
{
- m_bDestroyed = true;
- if (m_Socket.IsValid())
- {
- m_Socket.CloseSocket();
- }
-
- // Synchronize with the cSocketThreads (so that they don't call us anymore)
- cRoot::Get()->GetServer()->ClientDestroying(this);
+ m_bDestroyed = true;
+ if (m_Socket.IsValid())
+ {
+ m_Socket.CloseSocket();
+ }
+
+ // Synchronize with the cSocketThreads (so that they don't call us anymore)
+ cRoot::Get()->GetServer()->ClientDestroying(this);
}
@@ -237,6 +237,7 @@ void cClientHandle::Destroy()
void cClientHandle::Kick(const AString & a_Reason)
{
+ LOG("Kicking user \"%s\" for \"%s\"", m_Username.c_str(), a_Reason.c_str());
Send(cPacket_Disconnect(a_Reason));
m_bKicking = true;
}
@@ -512,10 +513,10 @@ void cClientHandle::HandleHandshake(cPacket_Handshake * a_Packet)
cPacket_Chat Connecting(m_Username + " is connecting.");
cRoot::Get()->GetServer()->Broadcast(Connecting, this);
- // Give a server handshake thingy back
cPacket_Handshake Handshake;
Handshake.m_Username = cRoot::Get()->GetServer()->GetServerID();
Send(Handshake);
+ LOG("User \"%s\" was sent a handshake", m_Username.c_str());
}