summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-02 11:18:02 +0200
committermadmaxoft <github@xoft.cz>2014-05-02 12:35:34 +0200
commit4d704255de1368d7d9912458053c2de14be1b5ac (patch)
tree0177fbc8c3fa1b40b4d22f0563a3f934d5264749 /src/ClientHandle.cpp
parentFixed warnings in ManualBindings. (diff)
downloadcuberite-4d704255de1368d7d9912458053c2de14be1b5ac.tar
cuberite-4d704255de1368d7d9912458053c2de14be1b5ac.tar.gz
cuberite-4d704255de1368d7d9912458053c2de14be1b5ac.tar.bz2
cuberite-4d704255de1368d7d9912458053c2de14be1b5ac.tar.lz
cuberite-4d704255de1368d7d9912458053c2de14be1b5ac.tar.xz
cuberite-4d704255de1368d7d9912458053c2de14be1b5ac.tar.zst
cuberite-4d704255de1368d7d9912458053c2de14be1b5ac.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 4ed0d682f..29213ca2d 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1510,7 +1510,7 @@ void cClientHandle::HandleDisconnect(const AString & a_Reason)
{
LOGD("Received d/c packet from %s with reason \"%s\"", m_Username.c_str(), a_Reason.c_str());
- cRoot::Get()->GetPluginManager()->CallHookDisconnect(m_Player, a_Reason);
+ cRoot::Get()->GetPluginManager()->CallHookDisconnect(*this, a_Reason);
m_HasSentDC = true;
Destroy();
@@ -2689,9 +2689,9 @@ void cClientHandle::SocketClosed(void)
LOGD("Player %s @ %s disconnected", m_Username.c_str(), m_IPString.c_str());
- if (m_Username != "") // Ignore client pings
+ if (!m_Username.empty()) // Ignore client pings
{
- cRoot::Get()->GetPluginManager()->CallHookDisconnect(m_Player, "Player disconnected");
+ cRoot::Get()->GetPluginManager()->CallHookDisconnect(*this, "Player disconnected");
}
Destroy();