Added ForceKillAll to kick all players.

This commit is contained in:
ricky 2011-06-15 13:49:42 +10:00
parent 3af6e990dc
commit 3ced4fc089
3 changed files with 19 additions and 21 deletions

View file

@ -443,13 +443,7 @@ namespace TShockAPI
public static void Off(CommandArgs args)
{
for (int player = 0; player < Main.maxPlayers; player++)
{
if (Main.player[player].active)
{
Tools.ForceKick(player, "Server shutting down!");
}
}
Tools.ForceKickAll("Server shutting down!");
WorldGen.saveWorld();
Netplay.disconnect = true;
}
@ -1066,13 +1060,7 @@ namespace TShockAPI
Process.Start(new ProcessStartInfo("UpdateTShock.exe"));
for (int player = 0; player < Main.maxPlayers; player++)
{
if (Main.player[player].active)
{
Tools.ForceKick(player, "Server shutting down for update!");
}
}
Tools.ForceKickAll("Server shutting down for update!");
WorldGen.saveWorld();
Netplay.disconnect = true;
}