Ejemplo n.º 1
0
 private final void decodeGrab(InputStream stream) {
   if (stream.getRemaining() != 8) {
     System.out.println(" " + stream.getRemaining());
     session.getChannel().close();
     return;
   }
   session.setEncoder(0);
   if (stream.readInt() != Settings.CLIENT_BUILD
       || stream.readInt() != Settings.CUSTOM_CLIENT_BUILD) {
     session.setDecoder(-1);
     session.getGrabPackets().sendOutdatedClientPacket();
     return;
   }
   session.setDecoder(1);
   session.getGrabPackets().sendStartUpPacket();
 }
Ejemplo n.º 2
0
 private final void decodeLogin(InputStream stream) {
   if (stream.getRemaining() != 0) {
     session.getChannel().close();
     return;
   }
   session.setDecoder(2);
   session.setEncoder(1);
   session.getLoginPackets().sendStartUpPacket();
 }