Unified shutdown functions for Telnet.
This commit is contained in:
@@ -41,7 +41,7 @@ public class ServerAbort implements ITelnetCommand
|
||||
@Override
|
||||
public String handle(ChannelHandlerContext ctx, String[] args)
|
||||
{
|
||||
Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString());
|
||||
Shutdown.getInstance().abort(null);
|
||||
return "Server shutdown/restart aborted!";
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public class ServerRestart implements ITelnetCommand
|
||||
return null;
|
||||
}
|
||||
final int time = Integer.parseInt(args[0]);
|
||||
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true);
|
||||
Shutdown.getInstance().startShutdown(null, time, true);
|
||||
return "Server will restart in " + time + " seconds!";
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public class ServerShutdown implements ITelnetCommand
|
||||
return null;
|
||||
}
|
||||
final int time = Integer.parseInt(args[0]);
|
||||
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false);
|
||||
Shutdown.getInstance().startShutdown(null, time, false);
|
||||
return "Server will shutdown in " + time + " seconds!";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user