mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] Admins will no longer accidentally undelay round end or reboot the server when multiple admins attempt to delay it at the same time. (#6226)
* Admins will no longer accidentally undelay round end or reboot the server when multiple admins attempt to delay it at the same time. * Update topic.dm Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk> Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Timberpoes
Gandalf
parent
cd7e358f52
commit
99fac070ec
+33
-16
@@ -206,23 +206,40 @@
|
||||
*/
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
//SKYRAT EDIT CHANGE END
|
||||
if(!SSticker.delay_end)
|
||||
SSticker.admin_delay_notice = input(usr, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text
|
||||
if(isnull(SSticker.admin_delay_notice))
|
||||
return
|
||||
else
|
||||
if(tgui_alert(usr, "Really cancel current round end delay? The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Undelay round end", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
SSticker.admin_delay_notice = null
|
||||
SSticker.delay_end = !SSticker.delay_end
|
||||
var/reason = SSticker.delay_end ? "for reason: [SSticker.admin_delay_notice]" : "."//laziness
|
||||
var/msg = "[SSticker.delay_end ? "delayed" : "undelayed"] the round end [reason]"
|
||||
log_admin("[key_name(usr)] [msg]")
|
||||
message_admins("[key_name_admin(usr)] [msg]")
|
||||
if(SSticker.ready_for_reboot && !SSticker.delay_end) //we undelayed after standard reboot would occur
|
||||
SSticker.standard_reboot()
|
||||
//SKYRAT EDIT END
|
||||
if(SSticker.delay_end)
|
||||
tgui_alert(usr, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
|
||||
return
|
||||
|
||||
var/delay_reason = input(usr, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text
|
||||
|
||||
if(isnull(delay_reason))
|
||||
return
|
||||
|
||||
if(SSticker.delay_end)
|
||||
tgui_alert(usr, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
|
||||
return
|
||||
|
||||
SSticker.delay_end = TRUE
|
||||
SSticker.admin_delay_notice = delay_reason
|
||||
|
||||
log_admin("[key_name(usr)] delayed the round end for reason: [SSticker.admin_delay_notice]")
|
||||
message_admins("[key_name_admin(usr)] delayed the round end for reason: [SSticker.admin_delay_notice]")
|
||||
else if(href_list["undelay_round_end"])
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(tgui_alert(usr, "Really cancel current round end delay? The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Undelay round end", list("Yes", "No")) == "No")
|
||||
return
|
||||
|
||||
SSticker.admin_delay_notice = null
|
||||
SSticker.delay_end = FALSE
|
||||
|
||||
log_admin("[key_name(usr)] undelayed the round end.")
|
||||
if(SSticker.ready_for_reboot)
|
||||
message_admins("[key_name_admin(usr)] undelayed the round end. You must now manually Reboot World to start the next shift.")
|
||||
else
|
||||
message_admins("[key_name_admin(usr)] undelayed the round end.")
|
||||
else if(href_list["end_round"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user