mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Make map vote rigging 99% less likely to fuck up the server
This commit is contained in:
@@ -115,16 +115,18 @@
|
||||
return
|
||||
vote.choices[winner] = ARBITRARILY_LARGE_NUMBER
|
||||
else
|
||||
winner = input(usr,"Add a result.","Add a result","") as text|null
|
||||
if(!winner)
|
||||
return
|
||||
if(vote.ismapvote)
|
||||
var/path = input(usr,"Add the map path.","Path","") as text|null
|
||||
winner = input(usr,"Pick a map, choose a duplicate and pomf will hurt you.") as text|anything|null in vote.allmaps
|
||||
var/path = vote.allmaps[winner]
|
||||
if(!path)
|
||||
to_chat(usr,"<span class='warning'>You must specify a path to rig a mapvote!</span>")
|
||||
return
|
||||
vote.ismapvote[winner] = path
|
||||
to_chat(usr,"<span class='info'>Set path as [path]. Hope that's right...</span>")
|
||||
else
|
||||
winner = input(usr,"Add a result.","Add a result","") as text|null
|
||||
if(!winner)
|
||||
return
|
||||
vote.choices[winner] = ARBITRARILY_LARGE_NUMBER
|
||||
message_admins("Admin [key_name_admin(usr)] rigged the vote for [winner].")
|
||||
log_admin("Admin [key_name(usr)] rigged the vote for [winner]. Choices were [vote.choices.Join(", ")]")
|
||||
|
||||
Reference in New Issue
Block a user