diff --git a/ChatTwo/Code/ChatCode.cs b/ChatTwo/Code/ChatCode.cs index eada186..f982865 100755 --- a/ChatTwo/Code/ChatCode.cs +++ b/ChatTwo/Code/ChatCode.cs @@ -110,4 +110,47 @@ internal class ChatCode return false; } } + + internal bool IsPlayerMessage() + { + switch (Type) + { + case ChatType.Say: + case ChatType.Shout: + case ChatType.TellOutgoing: + case ChatType.TellIncoming: + case ChatType.Party: + case ChatType.CrossParty: + case ChatType.Linkshell1: + case ChatType.Linkshell2: + case ChatType.Linkshell3: + case ChatType.Linkshell4: + case ChatType.Linkshell5: + case ChatType.Linkshell6: + case ChatType.Linkshell7: + case ChatType.Linkshell8: + case ChatType.CrossLinkshell1: + case ChatType.CrossLinkshell2: + case ChatType.CrossLinkshell3: + case ChatType.CrossLinkshell4: + case ChatType.CrossLinkshell5: + case ChatType.CrossLinkshell6: + case ChatType.CrossLinkshell7: + case ChatType.CrossLinkshell8: + case ChatType.FreeCompany: + case ChatType.NoviceNetwork: + case ChatType.Yell: + case ChatType.ExtraChatLinkshell1: + case ChatType.ExtraChatLinkshell2: + case ChatType.ExtraChatLinkshell3: + case ChatType.ExtraChatLinkshell4: + case ChatType.ExtraChatLinkshell5: + case ChatType.ExtraChatLinkshell6: + case ChatType.ExtraChatLinkshell7: + case ChatType.ExtraChatLinkshell8: + return true; + default: + return false; + } + } } diff --git a/ChatTwo/Message.cs b/ChatTwo/Message.cs index a02e673..20d9571 100755 --- a/ChatTwo/Message.cs +++ b/ChatTwo/Message.cs @@ -192,10 +192,11 @@ internal class Message continue; } + var checkForEmotes = Code.IsPlayerMessage(); var builder = new StringBuilder(); foreach (var word in text.Content.Split(" ")) { - if (Plugin.Config.ShowEmotes && EmoteCache.Exists(word) && !Plugin.Config.BlockedEmotes.Contains(word)) + if (checkForEmotes && Plugin.Config.ShowEmotes && EmoteCache.Exists(word) && !Plugin.Config.BlockedEmotes.Contains(word)) { // We add all the previous collected text parts AddContentAfterURLCheck(builder.ToString(), text, chunk);