From f94456dd3eccc65a6f304d4b804ca09a67fa6008 Mon Sep 17 00:00:00 2001 From: faketruth Date: Wed, 5 Sep 2012 20:30:27 +0000 Subject: Added the possibility of reserved player slots by implementing the HandleHandshake hook! More info: http://forum.mc-server.org/showthread.php?tid=555 git-svn-id: http://mc-server.googlecode.com/svn/trunk@836 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol132.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/Protocol132.cpp') diff --git a/source/Protocol132.cpp b/source/Protocol132.cpp index 2765b66b2..d7cd70723 100644 --- a/source/Protocol132.cpp +++ b/source/Protocol132.cpp @@ -332,6 +332,11 @@ int cProtocol132::ParseHandshake(void) HANDLE_PACKET_READ(ReadBEInt, int, ServerPort); m_Username = Username; + if (!m_Client->HandleHandshake( m_Username )) + { + return PARSE_OK; // Player is not allowed into the server + } + // Send a 0xFD Encryption Key Request http://wiki.vg/Protocol#0xFD AString key; CryptoPP::StringSink sink(key); // GCC won't allow inline instantiation in the following line, damned temporary refs -- cgit v1.2.3