Skip to content
Permalink
Browse files

added 'stop message' that is actually just a kick message followed by…

… a server stop
  • Loading branch information...
dries007 committed Oct 14, 2014
1 parent a52cc0d commit f14d4ff71ad2dd5d1dd9586d3a1722794c7bcbf0
@@ -147,6 +147,7 @@ public void run()
{
try
{
renewQuery();
RCon rCon = getRCon();
for (String user : getPlayerList())
rCon.send("kick", user, NAME + " is taking over! Server Reboot!");
@@ -854,13 +855,16 @@ public void printLine(String line)
* @return true if successful via RCon
* @throws ServerOnlineException
*/

public boolean stopServer() throws ServerOnlineException
public boolean stopServer(String message) throws ServerOnlineException
{
if (!getOnline()) return false;
try
{
renewQuery();
makeRcon();
printLine("----=====##### STOPPING SERVER WITH RCON #####=====-----");
for (String user : getPlayerList())
getRCon().send("kick", user, message);
getRCon().stop();
return true;
}
@@ -6,7 +6,7 @@
<div class="btn-group">
<button type="button" <#if allowModify && !server.online>onclick="call('server', '${server.name}', 'startServer')" <#else>disabled</#if> class="btn btn-success">Start</button>
<button type="button" class="btn btn-info" <#if allowModify>onclick="openPopup('/serverconsole/${server.name}')" <#else>disabled</#if>>Console</button>
<button type="button" <#if allowModify && server.online>onclick="call('server', '${server.name}', 'stopServer')" <#else>disabled</#if> class="btn btn-warning">Stop</button>
<button type="button" <#if allowModify && server.online>onclick="call('server', '${server.name}', 'stopServer', prompt('Message?', 'Server is stopping.'))" <#else>disabled</#if> class="btn btn-warning">Stop</button>
<button type="button" <#if allowModify && server.online>onclick="if (confirm('Are you sure?')) call('server', '${server.name}', 'forceStopServer');" <#else>disabled</#if> class="btn btn-danger">Kill</button>
</div>
</p>
@@ -23,7 +23,7 @@
<div class="btn-group">
<button type="button" <#if !server.online>onclick="call('server', '${server.name}', 'startServer')" <#else>disabled</#if> class="btn btn-success btn-xs">Start</button>
<button type="button" class="btn btn-info btn-xs" onclick="openPopup('/console/${server.name}')">Console</button>
<button type="button" <#if server.online>onclick="call('server', '${server.name}', 'stopServer')" <#else>disabled</#if> class="btn btn-warning btn-xs">Stop</button>
<button type="button" <#if server.online>onclick="call('server', '${server.name}', 'stopServer', prompt('Message?', 'Server is stopping.'))" <#else>disabled</#if> class="btn btn-warning btn-xs">Stop</button>
<button type="button" <#if server.online>onclick="if (confirm('Are you sure?')) call('server', '${server.name}', 'forceStopServer');" <#else>disabled</#if> class="btn btn-danger btn-xs">Kill</button>
</div>
</td>

0 comments on commit f14d4ff

Please sign in to comment.
You can’t perform that action at this time.