diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 4889d3f..8186cc7 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -175,7 +175,12 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame): def applyFilter(self, keyArgs, strict = False): text = self.chatEntry.get(plain=True) - if len(text) > 0 and text[0] in ['~', '>']: + prefixes = [] + if base.cr.magicWordManager and base.cr.wantMagicWords: + prefixes.append(base.cr.magicWordManager.chatPrefix) + if config.GetBool('exec-chat', 0): + prefixes.append('>') + if len(text) > 0 and text[0] in prefixes: self.okayToSubmit = True else: words = text.split(' ') diff --git a/toontown/spellbook/ToontownMagicWordManager.py b/toontown/spellbook/ToontownMagicWordManager.py index 915ae08..bf32b8b 100644 --- a/toontown/spellbook/ToontownMagicWordManager.py +++ b/toontown/spellbook/ToontownMagicWordManager.py @@ -49,8 +49,7 @@ class ToontownMagicWordManager(DistributedObject.DistributedObject): DistributedObject.DistributedObject.announceGenerate(self) # Only use a custom Magic Word activator if the index is allowed - # TODO: Uncomment after adding settings support - activatorIndex = 0 # base.settings.getInt('game', 'magic-word-activator', 0) + activatorIndex = base.settings.getSetting('magic-word-activator', 0) if 0 <= activatorIndex <= (len(PREFIX_ALLOWED) - 1): self.chatPrefix = PREFIX_ALLOWED[activatorIndex]