1
0
mirror of https://github.com/Earu/EasyChat.git synced 2025-03-04 03:13:20 -05:00

pass the name as part of the macro table in the macro hook

This commit is contained in:
Earu 2022-06-24 15:53:24 +02:00
parent 1786d5922e
commit 4c268a02f3

View File

@ -82,6 +82,8 @@ function macro_processor:ProcessString(str)
local macro = self.Macros[macro_name]
local pos_offset = ("<%s>"):format(macro_name):len()
if macro then
macro.Name = macro_name -- for the hook
local str_input = str:sub(start_pos + pos_offset)
local str_chunk = self:ProcessMacro(macro, str_input)
local ret = EasyChat.SafeHookRun("ECOnProcessMacro", macro, str_input, str_chunk)