mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Merge pull request #11155 from Niknakflak/Restart_votes_Restriction
Makes restart votes not restart the server if admins are online
This commit is contained in:
@@ -116,7 +116,16 @@ var/datum/subsystem/vote/SSvote
|
||||
else
|
||||
master_mode = .
|
||||
if(restart)
|
||||
world.Reboot("Restart vote successful.", "end_error", "restart vote")
|
||||
var/active_admins = 0
|
||||
for(var/client/C in admins)
|
||||
if(!C.is_afk() && check_rights_for(C, R_SERVER))
|
||||
active_admins = 1
|
||||
break
|
||||
if(!active_admins)
|
||||
world.Reboot("Restart vote successful.", "end_error", "restart vote")
|
||||
else
|
||||
world << "<span style='boldannounce'>Notice:Restart vote will not restart the server automatically because there are active admins on.</span>"
|
||||
message_admins("A restart vote has passed, but there are active admins on with +server, so it has been canceled. If you wish, you may restart the server.")
|
||||
|
||||
return .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user