The documentation, http://www.gammon.com.au/scripts/doc.php?general=plugin_callbacks, says this:
Quote: OnPluginPacketReceived
--
-- MUSHclient has received the packet 'sText'
--
function OnPluginPacketReceived (sText)
end -- function
This function is called when each incoming packet (data) arrives from the MUD. A packet does not necessarily start or end on line boundaries, and may consist of partial lines, or more than one line.
You can return data from this function (in version 3.59 onwards). If you do, then the returned data will replace the incoming data. In other words, you can change words, omit lines, add new lines, and MUSHclient will proceed as if the altered line had arrived from the MUD.
In practice, I believe that the text you get here is the uncompressed text, i.e., after the MCCP layer has been processed. The documentation is slightly misleading as to this fact, although I read it to mean that decompression has already taken place because it speaks of words, lines, etc.
Could the documentation perhaps be reworded to clarify that the packet is post-compression? (Or is that not actually the case?) |