Fixed dedicated server crashes

This commit is contained in:
Anuken 2018-02-27 20:30:55 -05:00
parent 1195b6c541
commit b67a4f3c14
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#Autogenerated file. Do not modify.
#Tue Feb 27 19:35:27 EST 2018
#Tue Feb 27 20:28:50 EST 2018
version=release
androidBuildCode=313
androidBuildCode=317
name=Mindustry
code=3.4
build=29

View File

@ -291,7 +291,7 @@ public class ServerControl extends Module {
}
if(target != null){
String ip = Net.getConnection(player.clientid).address;
String ip = Net.getConnection(target.clientid).address;
netServer.admins.banPlayer(ip);
Net.kickConnection(target.clientid, KickReason.banned);
info("Banned player by IP: {0}", ip);
@ -352,7 +352,7 @@ public class ServerControl extends Module {
}
if(target != null){
String ip = Net.getConnection(player.clientid).address;
String ip = Net.getConnection(target.clientid).address;
netServer.admins.adminPlayer(ip);
NetEvents.handleAdminSet(target, true);
info("Admin-ed player by IP: {0} / {1}", ip, arg[0]);
@ -377,7 +377,7 @@ public class ServerControl extends Module {
}
if(target != null){
String ip = Net.getConnection(player.clientid).address;
String ip = Net.getConnection(target.clientid).address;
netServer.admins.unAdminPlayer(ip);
NetEvents.handleAdminSet(target, false);
info("Un-admin-ed player by IP: {0} / {1}", ip, arg[0]);