Also refactor and hook ui.Chat, this way if the message is sent before the delay is up on typing in chat, the message will still be filtered. Although the delay is so short that the message is filtered after each keystroke at the moment anyway.
Removing the hook on ui.Chat as well as the delay would allow the code to function still, or removing the hook on each keystroke and leaving only the ui.Chat hook would do the same, but the censored text would only appear upon being sent.
Also refactor and hook
ui.Chat
, this way if the message is sent before the delay is up on typing in chat, the message will still be filtered. Although the delay is so short that the message is filtered after each keystroke at the moment anyway.Removing the hook on ui.Chat as well as the delay would allow the code to function still, or removing the hook on each keystroke and leaving only the ui.Chat hook would do the same, but the censored text would only appear upon being sent.