Figura

Figura

509k Downloads

Immediate disconnection when "host:sendChatCommand()" runs with formatting codes included

Gakuto1112 opened this issue · 2 comments

commented

Description

Players who uses Figura avatar will be disconnected immediately because of "Illigal characters in chat" when avatar script runs host:sendChatCommand() or host:sendChatCommand() with formatting codes included.

How to reproduce

  1. Turn on "Chat Messages".
  2. Run codes like below with avatar script.
    Note: You cannot run this code with /figura run <code>.
host:sendChatCommand("§cThis text will force you to disconnect.")
  1. You will be kicked by Minecraft server.

    Disconnection screen

Expected behavior

Figura should remove formatting code when running host:sendChatCommand() or host:sendChatCommand() to prevent players from disconnecting.

Notes

  • This issue occurs even in single player because of Minecraft specifications.
commented

Play stupid games win stupid prizes I guess.
This can very easily be avoided in base Lua with a simple

str = str:gsub("§[0-9a-fklmnor]?", "")

Also, I would advise against the suggestion as some servers do allow the use of the section sign in chat messages sent by players.

commented

Not fixing this, as the server can allow the user to input "§" or have changed the blacklisted character to another one