@ -25,7 +25,7 @@
_addon.author = 'atom0s';
_addon.name = 'links';
_addon.version = '3.0.1';
_addon.version = '3.0.2';
require 'common'
@ -131,8 +131,15 @@ ashita.register_event('incoming_packet', function(id, size, data)
-- 0x004D - Server Message
if (id == 0x004D) then
-- Get the packet message size..
local s = struct.unpack('L', data, 0x14 + 1);
-- Clamp the size to the max packet size..
-- This is needed for DSP since it messes up chat alignment packets..
local ss = math.clamp(s, 1, size - 0x18);
-- Obtain the chat message from the packet..
msg, _ = struct.unpack('s', data, 0x18 + 1);
msg, _ = struct.unpack('c' .. ss, data, 0x18 + 1);
end
-- 0x00CA - Bazaar Message