From ec39d3117d2b03b845fb73df0a39ed733eebf615 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Sat, 11 Jun 2022 20:52:50 -0400 Subject: [PATCH 1/4] Restart vote tweaks Makes it so you can only trigger restart votes if there are no staff on/if you are staff --- code/controllers/subsystems/vote.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 658cff17164..d0a87ebdae9 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -362,7 +362,11 @@ SUBSYSTEM_DEF(vote) if(VOTE_RESTART) if(config.allow_vote_restart || usr.client.holder) - initiate_vote(VOTE_RESTART, usr.key) + if(!GLOB.admins.len || usr.client.holder) + if(tgui_alert(usr, "Are you sure you want to start a RESTART VOTE? You should only do this if the server is dying and no staff are around to investigate.", "RESTART VOTE", list("No", "Yes I want to start a RESTART VOTE")) == "Yes I want to start a RESTART VOTE") + initiate_vote(VOTE_RESTART, usr.key) + else + to_chat(usr, "You can't start a RESTART VOTE while there are staff around. If you are having an issue with the round, please ahelp it.") if(VOTE_GAMEMODE) if(config.allow_vote_mode || usr.client.holder) initiate_vote(VOTE_GAMEMODE, usr.key) From c30233d1f742f3b04be03bc210af78247598a0b4 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Sat, 11 Jun 2022 21:43:53 -0400 Subject: [PATCH 2/4] Revision --- code/controllers/subsystems/vote.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index d0a87ebdae9..4f3856ca6f3 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -362,7 +362,8 @@ SUBSYSTEM_DEF(vote) if(VOTE_RESTART) if(config.allow_vote_restart || usr.client.holder) - if(!GLOB.admins.len || usr.client.holder) + var/admin_number_present = send2irc_adminless_only(initiator_ckey, name) + if(admin_number_present <= 0 || || usr.client.holder) if(tgui_alert(usr, "Are you sure you want to start a RESTART VOTE? You should only do this if the server is dying and no staff are around to investigate.", "RESTART VOTE", list("No", "Yes I want to start a RESTART VOTE")) == "Yes I want to start a RESTART VOTE") initiate_vote(VOTE_RESTART, usr.key) else From e4d0c2afec9cdc7d9b472aa35f233025b9cca693 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Sat, 11 Jun 2022 21:50:42 -0400 Subject: [PATCH 3/4] Oops --- code/controllers/subsystems/vote.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 4f3856ca6f3..309b654a284 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -363,7 +363,7 @@ SUBSYSTEM_DEF(vote) if(VOTE_RESTART) if(config.allow_vote_restart || usr.client.holder) var/admin_number_present = send2irc_adminless_only(initiator_ckey, name) - if(admin_number_present <= 0 || || usr.client.holder) + if(admin_number_present <= 0 || usr.client.holder) if(tgui_alert(usr, "Are you sure you want to start a RESTART VOTE? You should only do this if the server is dying and no staff are around to investigate.", "RESTART VOTE", list("No", "Yes I want to start a RESTART VOTE")) == "Yes I want to start a RESTART VOTE") initiate_vote(VOTE_RESTART, usr.key) else From 476cee162639758d6f9010164e0f67faa3428eba Mon Sep 17 00:00:00 2001 From: VerySoft Date: Sat, 11 Jun 2022 21:54:00 -0400 Subject: [PATCH 4/4] ANOTHER OOPS! --- code/controllers/subsystems/vote.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 309b654a284..61ba792151f 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -362,7 +362,7 @@ SUBSYSTEM_DEF(vote) if(VOTE_RESTART) if(config.allow_vote_restart || usr.client.holder) - var/admin_number_present = send2irc_adminless_only(initiator_ckey, name) + var/admin_number_present = send2irc_adminless_only(usr.ckey, usr) if(admin_number_present <= 0 || usr.client.holder) if(tgui_alert(usr, "Are you sure you want to start a RESTART VOTE? You should only do this if the server is dying and no staff are around to investigate.", "RESTART VOTE", list("No", "Yes I want to start a RESTART VOTE")) == "Yes I want to start a RESTART VOTE") initiate_vote(VOTE_RESTART, usr.key)