summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-05-03 15:07:56 +0200
committerTycho <work.tycho+git@gmail.com>2014-05-03 15:07:56 +0200
commitec407dd27dc35b5903fdddf2bad307784842d679 (patch)
tree69c699b9242fcccf4b7ee865b0c6a9842329c0d4 /src/ClientHandle.cpp
parentcCHunkBuffer that compiles with TestGlobals.h (diff)
parentSeperate instructions for OSX and Linux (diff)
downloadcuberite-ec407dd27dc35b5903fdddf2bad307784842d679.tar
cuberite-ec407dd27dc35b5903fdddf2bad307784842d679.tar.gz
cuberite-ec407dd27dc35b5903fdddf2bad307784842d679.tar.bz2
cuberite-ec407dd27dc35b5903fdddf2bad307784842d679.tar.lz
cuberite-ec407dd27dc35b5903fdddf2bad307784842d679.tar.xz
cuberite-ec407dd27dc35b5903fdddf2bad307784842d679.tar.zst
cuberite-ec407dd27dc35b5903fdddf2bad307784842d679.zip
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 2362abe1e..29213ca2d 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -716,7 +716,7 @@ void cClientHandle::UnregisterPluginChannels(const AStringVector & a_ChannelList
-void cClientHandle::HandleCommandBlockMessage(const char * a_Data, unsigned int a_Length)
+void cClientHandle::HandleCommandBlockMessage(const char * a_Data, size_t a_Length)
{
if (a_Length < 14)
{
@@ -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();
@@ -1658,7 +1658,7 @@ void cClientHandle::SendData(const char * a_Data, size_t a_Size)
{
// There is a queued overflow. Append to it, then send as much from its front as possible
m_OutgoingDataOverflow.append(a_Data, a_Size);
- int CanFit = m_OutgoingData.GetFreeSpace();
+ size_t CanFit = m_OutgoingData.GetFreeSpace();
if (CanFit > 128)
{
// No point in moving the data over if it's not large enough - too much effort for too little an effect
@@ -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();