Code:
PacketHandler.packetId[202] = new IdleLogout();
Same file
Code:
import server.Core.Login.IdleLogout;
IdleLogout.java - you may need to create the file
Code:
package server.Core.Login;
import server.Model.Player.Client;
import server.Model.Player.packetmanager.PacketType;
public class IdleLogout implements PacketType {
@Override
public void processPacket(final Client c, final int packetType,
final int packetSize) {
// c.logout();
}
}
Code:
import org.apache.mina.common.IdleStatus;
Code:
@Override
public void sessionIdle(final IoSession arg0, final IdleStatus arg1)
throws Exception {
//arg0.close();
}
@Override
public void sessionOpened(final IoSession arg0) throws Exception {
arg0.setIdleTime(IdleStatus.BOTH_IDLE, 60);
arg0.getFilterChain().addLast("protocolFilter",
new ProtocolCodecFilter(new CodecFactory()));
}
Should work
you may or may not need to edit some client-sided stuff