-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup non printable characters and special sequences from chat messages #532
Comments
Some chatting about issue: SX: created issue #532 to cleanup nonptintable characters and/or special sequeneces |
This probably would be easiest solution as I think it will be enough to just strip control characters from messages sent by players, maybe few trash messages will get through but they will quickly learn that colored messages will not work.
Similar to first option but need a bit more code / message parsing / cleanup as this would need to match whole control sequence, validate it similar way mt engine does and then remove it similar way that mt engine would.
This requires a bit more code but still not very much, would be nice option someone willing to do conversion for currently used platforms irc and discord. |
I already looked at that, discord does not have (real) coloring for text, stripping the control-codes sounds good IMO... |
Added that, code is basically: beerchat.register_callback('on_receive', function(msg_data)
msg_data.message = msg_data.message:gsub('%c','')
end) Rest of it is new callback handling. Seems that github linked PR here too ^^. And to actually use control char cleaner: |
mods updated |
So cleanup things like colored chat messages, worst is rainbow text which looks like nonsense gibberish in discord/irc:
Cleanup these things when sending messages to discord / irc.
Maybe consider cleaning up these also in game chat.
Another thing to think about is possible conversion for chat platforms irc / discord.
The text was updated successfully, but these errors were encountered: