diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index e2b8ae917b..09a187f010 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -115,6 +115,10 @@ namespace Content.Server.Chat.Managers public void SendHookOOC(string sender, string message) { + if (!_oocEnabled && _configurationManager.GetCVar(CCVars.DisablingOOCDisablesRelay)) + { + return; + } message = FormattedMessage.EscapeText(message); var messageWrap = Loc.GetString("chat-manager-send-hook-ooc-wrap-message", ("senderName", sender)); ChatMessageToAll(ChatChannel.OOC, message, messageWrap); diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 40a91cdc8e..1baec87524 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -697,6 +697,11 @@ namespace Content.Shared.CCVar public static readonly CVarDef AdminOocEnabled = CVarDef.Create("ooc.enabled_admin", true, CVar.NOTIFY); + /// + /// If true, whenever OOC is disabled the Discord OOC relay will also be disabled. + /// + public static readonly CVarDef DisablingOOCDisablesRelay = CVarDef.Create("ooc.disabling_ooc_disables_relay", true, CVar.SERVERONLY); + /* * LOOC */