Minor admin bugfixes, made players wait 30 seconds after being kicked
This commit is contained in:
@@ -134,23 +134,6 @@ public class KryoServer implements ServerProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kick(int connection, KickReason reason) {
|
||||
KryoConnection con = getByID(connection);
|
||||
if(con == null){
|
||||
Log.err("Cannot kick unknown player!");
|
||||
return;
|
||||
}else{
|
||||
Log.info("Kicking connection #{0} / IP: {1}. Reason: {2}", connection, con.address, reason);
|
||||
}
|
||||
|
||||
KickPacket p = new KickPacket();
|
||||
p.reason = reason;
|
||||
|
||||
con.send(p, SendMode.tcp);
|
||||
Timers.runTask(2f, con::close);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void host(int port) throws IOException {
|
||||
lastconnection = 0;
|
||||
@@ -278,12 +261,6 @@ public class KryoServer implements ServerProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPingFor(NetConnection con) {
|
||||
KryoConnection k = (KryoConnection)con;
|
||||
return k.connection == null ? 0 : k.connection.getReturnTripTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose(){
|
||||
close();
|
||||
|
||||
Reference in New Issue
Block a user