Commit Graph

3 Commits

Author SHA1 Message Date
SkyratBot
b4e30f8e42 [MIRROR] Fixes strange runtime with restart votes [MDB IGNORE] (#13686)
* Fixes strange runtime with restart votes (#67080)

So, I refactored votes a little bit ago.
This line was present in the result process for restart votes.

for(var/client/C in GLOB.admins + GLOB.deadmins)
	if(!C.is_afk() && check_rights_for(C, R_SERVER))
		active_admins = TRUE
		break

So, I converted it to this.

for(var/client/online_admin as anything in GLOB.admins | GLOB.deadmins)
	if(online_admin.is_afk() || !check_rights_for(online_admin, R_SERVER))
		continue

Seems fine, right?
Unfortunately, no.

GLOB.deadmins is a global list of deadminned ckeys. Not deadminned clients.
So, the original loop iterated over a combined list of clients AND ckeys, but ONLY typechecked for clients.

Why were we adding in ckeys in the first place, if it didn't even check them?
No idea. But it seems like, since no one noticed restart votes weren't checking for deadminned admins in the first place, there isn't a reason to continue to consider them. Admins can re-admin to cancel restart votes or address the server's concerns if they're online, I suppose.

* Fixes strange runtime with restart votes

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-05-18 19:53:57 +01:00
SkyratBot
528fd70c40 [MIRROR] Fixes some minor formatting issues with vote text [MDB IGNORE] (#13584)
* Fixes some minor formatting issues with vote text (#66913)

* Fixes some minor formatting issues with vote

* Wrong thing.

* Actually I think this is supposed to be here

* Fixes some minor formatting issues with vote text

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-05-13 11:31:39 +01:00
SkyratBot
9485e35615 [MIRROR] Refactors SSvote, makes votes into datums, also makes vote ui Typescript [MDB IGNORE] (#13448)
* Refactors SSvote, makes votes into datums, also makes vote ui Typescript

* yes

* Update transfer_vote.dm

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-05-09 01:42:27 +01:00