mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
Fix offline mode. Latest snapshot appears to be pretty much functional, although the client itself seems to have some reliability issues.
This commit is contained in:
parent
b7babd2888
commit
cdf47d84d8
@ -40,9 +40,9 @@ public class EncryptionUtil
|
||||
}
|
||||
}
|
||||
|
||||
public static EncryptionRequest encryptRequest(boolean onlinemode)
|
||||
public static EncryptionRequest encryptRequest()
|
||||
{
|
||||
String hash = ( onlinemode ) ? Long.toString( random.nextLong(), 16 ) : "-";
|
||||
String hash = Long.toString( random.nextLong(), 16 );
|
||||
byte[] pubKey = keys.getPublic().getEncoded();
|
||||
byte[] verify = new byte[ 4 ];
|
||||
random.nextBytes( verify );
|
||||
|
@ -1,8 +1,6 @@
|
||||
package net.md_5.bungee.connection;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import java.math.BigInteger;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.URLEncoder;
|
||||
@ -249,7 +247,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
// TODO: Nuuuu Mojang why u do this
|
||||
// unsafe().sendPacket( PacketConstants.I_AM_BUNGEE );
|
||||
// unsafe().sendPacket( PacketConstants.FORGE_MOD_REQUEST );
|
||||
unsafe().sendPacket( request = EncryptionUtil.encryptRequest( this.onlineMode ) );
|
||||
if ( this.onlineMode )
|
||||
{
|
||||
unsafe().sendPacket( request = EncryptionUtil.encryptRequest() );
|
||||
} else
|
||||
{
|
||||
finish();
|
||||
}
|
||||
thisState = State.ENCRYPT;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user