Closed nmeum closed 3 years ago
Originally thought this would work as is, but upon further digging, messagePrefix
should only be added if the param contains a space, or begins with :
. If the parameter contains a colon, that doesn't necessarily indicate there should be a prefix. As far as the ::
scenario, I've adjusted the tests to include this scenario, and I added the specific :
prefix check, that should cover these cases.
Let me know if this doesn't work.
For messages that contain either a colon or a space character, a messagePrefix needs to be added to the serialized messages. Previously, a message prefix was only added for messages containing a space character. This causes messages which only contain a colon, but not a space to be serialized incorrectly.
For example, prior to this commit a command like
PRIVMSG #foo ::)
, which should send the message:)
to the channel#foo
, was serialized asPRIVMSG #foo :)
which only causes a)
character to be sent to the channel#foo
.