From 6a6822350b48f431216e7b4d52ac502b76955694 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Mon, 7 Mar 2022 02:52:17 -0600 Subject: [PATCH] Fixes automute bug --- code/game/say.dm | 2 +- code/modules/mob/living/say.dm | 2 +- code/modules/surgery/organs/vocal_cords.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/say.dm b/code/game/say.dm index cb049303b848..8ba42855c4cb 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -22,7 +22,7 @@ GLOBAL_LIST_INIT(freqtospan, list( )) /atom/movable/proc/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null) - if(!can_speak()) + if(!can_speak(message)) return if(message == "" || !message) return diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index f92f42084b04..a1bf37d82892 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(special_radio_keys, list( if(client.prefs.muted & MUTE_IC) to_chat(src, span_danger("You cannot speak in IC (muted).")) return FALSE - if(!ignore_spam && client.handle_spam_prevention(message,MUTE_IC)) + if(!ignore_spam && message != null && client.handle_spam_prevention(message,MUTE_IC)) return FALSE return TRUE diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 5a47376f84c6..45e0aac156c1 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -126,7 +126,7 @@ /proc/voice_of_god(message, mob/living/user, list/span_list, base_multiplier = 1, include_speaker = FALSE, message_admins = TRUE, forced_span = FALSE) var/cooldown = 0 - if(!user || !user.can_speak() || user.stat) + if(!user || !user.can_speak(message) || user.stat) return 0 //no cooldown var/log_message = uppertext(message)