Commit c5908e63 authored by Simpy's avatar Simpy 🐹
Browse files

correctly delay when sending long messages (which are split) via `LibElvUIPlugin-1.0`

parent eb2bca4d
local MAJOR, MINOR = "LibElvUIPlugin-1.0", 17
local MAJOR, MINOR = "LibElvUIPlugin-1.0", 18
local lib, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end
......@@ -223,7 +223,7 @@ function lib:SendPluginVersionCheck(message)
splitMessage = strmatch(strsub(message, 1, maxChar), '.+;')
if splitMessage then -- incase the string is over 250 but doesnt contain `;`
message = gsub(message, "^"..gsub(splitMessage, '([%(%)%.%%%+%-%*%?%[%^%$])','%%%1'), "")
ElvUI[1]:Delay(delay, SendAddonMessage(lib.prefix, splitMessage, ChatType))
ElvUI[1]:Delay(delay, SendAddonMessage, lib.prefix, splitMessage, ChatType)
delay = delay + 1
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment