Describe
When using the sendMessage (and similar) functions of the Chat Box, a range can be set with a parameter. During the creation of tests for #562 I noticed two issues with this:
- When a
chatBoxMaxRange is set in the config, one can simply pass -1 as a range to thesendMessage function and thus bypass the max range set in the config
- When
chatBoxMaxRange is set to -1 (default), passing a negative integer smaller than -1 as a range to thesendMessage function results in no message sent
Steps to reproduce
- Place a Computer and a Chat Box side by side
- In the Lua console of the computer, execute the following script
peripheral.find("chatBox").sendMessage("Message with short range", "GameTest", "<>", "&a", -1) (or peripheral.find("chatBox").sendMessage("Message with short range", "GameTest", "<>", "&a", -2))
Multiplayer?
No
Version
Own compiled build.
Minecraft, Forge and maybe other related mods versions
Forge 43.3.13 Minecraft 1.19.2
Screenshots or Videos
No response
Crashlog/log
No response
Describe
When using the
sendMessage(and similar) functions of the Chat Box, a range can be set with a parameter. During the creation of tests for #562 I noticed two issues with this:chatBoxMaxRangeis set in the config, one can simply pass -1 as a range to thesendMessagefunction and thus bypass the max range set in the configchatBoxMaxRangeis set to -1 (default), passing a negative integer smaller than -1 as a range to thesendMessagefunction results in no message sentSteps to reproduce
peripheral.find("chatBox").sendMessage("Message with short range", "GameTest", "<>", "&a", -1)(orperipheral.find("chatBox").sendMessage("Message with short range", "GameTest", "<>", "&a", -2))Multiplayer?
No
Version
Own compiled build.
Minecraft, Forge and maybe other related mods versions
Forge 43.3.13 Minecraft 1.19.2
Screenshots or Videos
No response
Crashlog/log
No response