GreenWall

GreenWall

1M Downloads

Truncated message to guild chat

ashayo opened this issue ยท 2 comments

commented

Long messages are sometimes truncated. (Only noticed because multi-boxing. Reproduced what guildie sent and got same result)
Reproducible example with 3 linked items:
Note that guildie probably meant "lol" at end, but reached max guild message size.

Guild chat:
17:09:10 [Mytoonname-EarthenRing]: so my first bag of the holiday: [Magic Broom] [Hallowed Helm] [The Horseman's Sinister Slicer] l

What was sent to channel:
17:09:11 [Mytoonname-EarthenRing]: C#verendus##so my first bag of the holiday: [Magic Broom] [Hallowed Helm]

Error user receives:
GreenWall: [ERROR] Message corruption detected. Please disable add-ons that might might modify messages on channel 4

(there are no addons modifying channel)

commented

Yep, still getting this:

[P] [Paandel]: (914.4) [Perpetual Leftovers] 
[O] [Torsin]: [Runescale Koi][Stormray][Highmountain Salmon][Stonedark Snail][Leyblood]

I assume it has to do with the length of the tag needing to be added to the guild chat to denote a message from the other guild? Perhaps you could detect a string over a certain length and split it across multiple sends to the other guild? Similar to:

		if (string.len(chatMsg) > 510) then
			SendChatMessage(string.sub(chatMsg, 1, 255), channel, nil, nil);
			SendChatMessage(string.sub(chatMsg, 256, 510), channel, nil, nil);
			SendChatMessage(string.sub(chatMsg, 511), channel, nil, nil);
		elseif (string.len(chatMsg) > 255) then
			SendChatMessage(string.sub(chatMsg, 1, 255), channel, nil, nil);
			SendChatMessage(string.sub(chatMsg, 256), channel, nil, nil);
		else
			SendChatMessage(string.sub(chatMsg, 1), channel, nil, nil);
		end
commented

Version 2 will allow messages to be segmented, which will fix this.