Fixed dedicated server crashes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user