summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r--source/cClientHandle.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 46669848e..6e029e14a 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -85,7 +85,7 @@ typedef std::list<cPacket*> PacketList;
struct cClientHandle::sClientHandleState
{
sClientHandleState()
- : ProtocolVersion( 22 )
+ : ProtocolVersion( 23 )
, pReceiveThread( 0 )
, pSendThread( 0 )
, pAuthenticateThread( 0 )
@@ -483,10 +483,14 @@ void cClientHandle::HandlePacket( cPacket* a_Packet )
{
LOG("LOGIN %s", GetUsername() );
cPacket_Login* PacketData = reinterpret_cast<cPacket_Login*>(a_Packet);
- if (PacketData->m_ProtocolVersion != m_pState->ProtocolVersion) {
+ if (PacketData->m_ProtocolVersion < m_pState->ProtocolVersion) {
Kick("Your client is outdated!");
return;
}
+ else if( PacketData->m_ProtocolVersion > m_pState->ProtocolVersion ) {
+ Kick("Your client version is higher than the server!");
+ return;
+ }
if( m_pState->Username.compare( PacketData->m_Username ) != 0 )
{
Kick("Login Username does not match Handshake username!");