From 620e0487196d2b1e9cee58a04a4e4a83cc0d91e4 Mon Sep 17 00:00:00 2001 From: AnturK Date: Mon, 27 Aug 2018 09:54:23 +0200 Subject: [PATCH] Keeps quiet on repeats. --- code/modules/mob/dead/new_player/poll.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/dead/new_player/poll.dm b/code/modules/mob/dead/new_player/poll.dm index 2e7d793c5a4..618425077bf 100644 --- a/code/modules/mob/dead/new_player/poll.dm +++ b/code/modules/mob/dead/new_player/poll.dm @@ -346,7 +346,7 @@ return //Returns null on failure, TRUE if already voted, FALSE if not voted yet. -/mob/dead/new_player/proc/poll_check_voted(pollid, text = FALSE) +/mob/dead/new_player/proc/poll_check_voted(pollid, text = FALSE, silent = FALSE) var/table = "poll_vote" if (text) table = "poll_textreply" @@ -359,7 +359,8 @@ return if(query_hasvoted.NextRow()) qdel(query_hasvoted) - to_chat(usr, "You've already replied to this poll.") + if(!silent) + to_chat(usr, "You've already replied to this poll.") return TRUE qdel(query_hasvoted) return FALSE @@ -517,7 +518,7 @@ if(!replytext) to_chat(usr, "The text you entered was blank. Please correct the text and submit again.") return - var/voted = poll_check_voted(pollid, TRUE) + var/voted = poll_check_voted(pollid, text = TRUE, silent = TRUE) if(isnull(voted)) return var/adminrank = sanitizeSQL(poll_rank())