diff options
author | madmaxoft <github@xoft.cz> | 2014-05-02 11:18:02 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-05-02 12:35:34 +0200 |
commit | 4d704255de1368d7d9912458053c2de14be1b5ac (patch) | |
tree | 0177fbc8c3fa1b40b4d22f0563a3f934d5264749 /src/ClientHandle.cpp | |
parent | Fixed warnings in ManualBindings. (diff) | |
download | cuberite-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 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
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(); |