From b41951e4e1dcfcbb800612d25fdd642cea055078 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Nov 2025 18:18:23 +0000 Subject: [PATCH] Patch GameManager.ChatMessage instead of ChatMessageServer This should properly intercept and block /bot messages from appearing in chat --- Harmony/BotCommandPatch.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Harmony/BotCommandPatch.cs b/Harmony/BotCommandPatch.cs index 2637e1c..c9d2e47 100644 --- a/Harmony/BotCommandPatch.cs +++ b/Harmony/BotCommandPatch.cs @@ -1,6 +1,5 @@ using HarmonyLib; using System.Reflection; -using System.Collections.Generic; using System; public class BotCommandMod : IModApi @@ -14,11 +13,10 @@ public class BotCommandMod : IModApi } } -[HarmonyPatch(typeof(GameManager))] -[HarmonyPatch("ChatMessageServer")] +[HarmonyPatch(typeof(GameManager), "ChatMessage")] public class ChatMessagePatch { - static bool Prefix(ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, bool _localizeMain, List _recipientEntityIds) + static bool Prefix(ClientInfo _cInfo, EChatType _type, string _msg, string _playerName) { if (_msg != null && _msg.StartsWith("/bot ")) {