summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Connection.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-25 21:57:12 +0200
committermadmaxoft <github@xoft.cz>2013-08-25 21:57:12 +0200
commitebc076e8b2abc6b33ebd6fb872c8edf6b6af7089 (patch)
tree6ac5c987b85337d04766e2d3999a19201a97ec64 /Tools/ProtoProxy/Connection.cpp
parentReduced LeakFinder's stack buffers to half. (diff)
downloadcuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.tar
cuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.tar.gz
cuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.tar.bz2
cuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.tar.lz
cuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.tar.xz
cuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.tar.zst
cuberite-ebc076e8b2abc6b33ebd6fb872c8edf6b6af7089.zip
Diffstat (limited to '')
-rw-r--r--Tools/ProtoProxy/Connection.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp
index 4c2b0d4e9..5a9300c2f 100644
--- a/Tools/ProtoProxy/Connection.cpp
+++ b/Tools/ProtoProxy/Connection.cpp
@@ -201,6 +201,9 @@ enum
PACKET_ENCRYPTION_KEY_REQUEST = 0xfd,
PACKET_PING = 0xfe,
PACKET_KICK = 0xff,
+
+ // Synonyms:
+ PACKET_DISCONNECT = PACKET_KICK,
} ;
@@ -568,6 +571,7 @@ bool cConnection::DecodeClientsPackets(const char * a_Data, int a_Size)
case PACKET_CHAT_MESSAGE: HANDLE_CLIENT_READ(HandleClientChatMessage); break;
case PACKET_CLIENT_STATUSES: HANDLE_CLIENT_READ(HandleClientClientStatuses); break;
case PACKET_CREATIVE_INVENTORY_ACTION: HANDLE_CLIENT_READ(HandleClientCreativeInventoryAction); break;
+ case PACKET_DISCONNECT: HANDLE_CLIENT_READ(HandleClientDisconnect); break;
case PACKET_ENCRYPTION_KEY_RESPONSE: HANDLE_CLIENT_READ(HandleClientEncryptionKeyResponse); break;
case PACKET_ENTITY_ACTION: HANDLE_CLIENT_READ(HandleClientEntityAction); break;
case PACKET_HANDSHAKE: HANDLE_CLIENT_READ(HandleClientHandshake); break;
@@ -843,6 +847,19 @@ bool cConnection::HandleClientCreativeInventoryAction(void)
+bool cConnection::HandleClientDisconnect(void)
+{
+ HANDLE_CLIENT_PACKET_READ(ReadBEUTF16String16, AString, Reason);
+ Log("Received a PACKET_DISCONNECT from the client:");
+ Log(" Reason = \"%s\"", Reason.c_str());
+ COPY_TO_SERVER();
+ return true;
+}
+
+
+
+
+
bool cConnection::HandleClientEncryptionKeyResponse(void)
{
HANDLE_CLIENT_PACKET_READ(ReadBEShort, short, EncKeyLength);