MCServer is now compatible with Minecraft client 1.1 (as long as the client is not using any mods/plugins I think)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@165 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user