Fixed disabling OOC not disabling the discord relay (#8275)
Co-authored-by: ike709 <ike709@github.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -697,6 +697,11 @@ namespace Content.Shared.CCVar
|
||||
public static readonly CVarDef<bool> AdminOocEnabled =
|
||||
CVarDef.Create("ooc.enabled_admin", true, CVar.NOTIFY);
|
||||
|
||||
/// <summary>
|
||||
/// If true, whenever OOC is disabled the Discord OOC relay will also be disabled.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> DisablingOOCDisablesRelay = CVarDef.Create("ooc.disabling_ooc_disables_relay", true, CVar.SERVERONLY);
|
||||
|
||||
/*
|
||||
* LOOC
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user