Adds CTF and Reboot buttons to check antags panel (#44851)

Makes dealing with end of round grief easier and faster for admins.
This commit is contained in:
nervere
2019-06-30 17:19:07 -07:00
committed by Tad Hardesty
parent adce31ac02
commit ea6ec655ce
2 changed files with 17 additions and 1 deletions
+2
View File
@@ -165,6 +165,8 @@
dat += "If limits past: <a href='?_src_=holder;[HrefToken()];toggle_noncontinuous_behavior=1'>[SSticker.mode.round_ends_with_antag_death ? "End The Round" : "Continue As Extended"]</a><BR>"
dat += "<a href='?_src_=holder;[HrefToken()];end_round=[REF(usr)]'>End Round Now</a><br>"
dat += "<a href='?_src_=holder;[HrefToken()];delay_round_end=1'>[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
dat += "<a href='?_src_=holder;[HrefToken()];ctf_toggle=1'>Enable/Disable CTF</a><br>"
dat += "<a href='?_src_=holder;[HrefToken()];rebootworld=1'>Reboot World</a><br>"
dat += "<a href='?_src_=holder;[HrefToken()];check_teams=1'>Check Teams</a>"
var/connected_players = GLOB.clients.len
var/lobby_players = 0
+15 -1
View File
@@ -1790,12 +1790,26 @@
log_query_debug("[usr.key] | [response]")
else if(answer == "no")
log_query_debug("[usr.key] | Reported no server hang")
else if(href_list["ctf_toggle"])
if(!check_rights(R_ADMIN))
return
toggle_all_ctf(usr)
else if(href_list["rebootworld"])
if(!check_rights(R_ADMIN))
return
var/confirm = alert("Are you sure you want to reboot the server?", "Confirm Reboot", "Yes", "No")
if(confirm == "No")
return
if(confirm == "Yes")
restart()
else if(href_list["check_teams"])
if(!check_rights(R_ADMIN))
return
check_teams()
else if(href_list["team_command"])
if(!check_rights(R_ADMIN))
return