From 6d91ad89c2fea6a57329ffb6a9157885f1219988 Mon Sep 17 00:00:00 2001 From: andrew6180 <16847730+andrew6180@users.noreply.github.com> Date: Fri, 17 Oct 2025 08:35:11 -0700 Subject: [PATCH] drop ascension embeded libraries --- WeakAuras/Libs/AceComm-3.0/AceComm-3.0.lua | 308 -- WeakAuras/Libs/AceComm-3.0/AceComm-3.0.xml | 5 - .../Libs/AceComm-3.0/ChatThrottleLib.lua | 523 --- .../AceSerializer-3.0/AceSerializer-3.0.lua | 287 -- .../AceSerializer-3.0/AceSerializer-3.0.xml | 4 - WeakAuras/Libs/AceTimer-3.0/AceTimer-3.0.lua | 327 -- WeakAuras/Libs/AceTimer-3.0/AceTimer-3.0.xml | 4 - .../CallbackHandler-1.0.lua | 238 -- .../CallbackHandler-1.0.xml | 4 - WeakAuras/Libs/LibCompress/LibCompress.lua | 1255 ------ WeakAuras/Libs/LibCompress/LibCompress.toc | 14 - WeakAuras/Libs/LibCompress/lib.xml | 4 - .../Libs/LibCustomGlow-1.0/IconAlert.blp | Bin 44900 -> 0 bytes .../Libs/LibCustomGlow-1.0/IconAlertAnts.blp | Bin 88580 -> 0 bytes .../LibCustomGlow-1.0/LibCustomGlow-1.0.lua | 1033 ----- .../LibCustomGlow-1.0/LibCustomGlow-1.0.toc | 12 - .../LibCustomGlow-1.0/LibCustomGlow-1.0.xml | 4 - WeakAuras/Libs/LibCustomGlow-1.0/README.md | 52 - .../Libs/LibCustomGlow-1.0/UIActionBarFX.blp | Bin 8389780 -> 0 bytes WeakAuras/Libs/LibCustomGlow-1.0/am_29.blp | Bin 88580 -> 0 bytes .../Libs/LibCustomGlow-1.0/artifacts.blp | Bin 1049748 -> 0 bytes .../Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua | 300 -- .../LibDataBroker-1.1/LibDataBroker-1.1.lua | 90 - .../Libs/LibDataBroker-1.1/README.textile | 13 - WeakAuras/Libs/LibDeflate/LICENSE.txt | 19 - WeakAuras/Libs/LibDeflate/LibDeflate.lua | 3605 ----------------- WeakAuras/Libs/LibDeflate/LibDeflate.toc | 14 - WeakAuras/Libs/LibDeflate/lib.xml | 4 - .../AceTimer-3.0/AceTimer-3.0.lua | 327 -- .../AceTimer-3.0/AceTimer-3.0.xml | 4 - .../CallbackHandler-1.0.lua | 238 -- .../CallbackHandler-1.0.xml | 4 - WeakAuras/Libs/LibGetFrame-1.0/LICENCE.txt | 339 -- .../Libs/LibGetFrame-1.0/LibGetFrame-1.0.lua | 746 ---- .../Libs/LibGetFrame-1.0/LibGetFrame-1.0.toc | 13 - .../Libs/LibGetFrame-1.0/LibGetFrame-1.0.xml | 7 - .../Libs/LibGetFrame-1.0/LibStub/LibStub.lua | 51 - .../Libs/LibGetFrame-1.0/LibStub/LibStub.toc | 9 - .../LibGetFrame-1.0/LibStub/tests/test.lua | 41 - .../LibGetFrame-1.0/LibStub/tests/test2.lua | 27 - .../LibGetFrame-1.0/LibStub/tests/test3.lua | 14 - .../LibGetFrame-1.0/LibStub/tests/test4.lua | 41 - WeakAuras/Libs/LibGetFrame-1.0/README.md | 187 - WeakAuras/Libs/LibGetFrame-1.0/stylua.toml | 5 - .../LibGroupTalents-1.0.lua | 1727 -------- .../LibGroupTalents-1.0.toc | 17 - .../LibTalentQuery-1.0.lua | 358 -- WeakAuras/Libs/LibGroupTalents-1.0/lib.xml | 5 - .../LibRangeCheck-2.0/LibRangeCheck-2.0.lua | 1033 ----- WeakAuras/Libs/LibSerialize/LibSerialize.lua | 1233 ------ WeakAuras/Libs/LibSerialize/lib.xml | 4 - .../LibSharedMedia-3.0/LibSharedMedia-3.0.lua | 246 -- WeakAuras/Libs/LibSharedMedia-3.0/lib.xml | 4 - .../LibSpellRange-1.0/LibSpellRange-1.0.lua | 235 -- .../LibSpellRange-1.0/LibSpellRange-1.0.toc | 11 - WeakAuras/Libs/LibSpellRange-1.0/README.md | 61 - WeakAuras/Libs/LibSpellRange-1.0/lib.xml | 3 - WeakAuras/Libs/LibStub/LibStub.lua | 51 - WeakAuras/Libs/LibStub/LibStub.toc | 9 - WeakAuras/Libs/LibStub/tests/test.lua | 41 - WeakAuras/Libs/LibStub/tests/test2.lua | 27 - WeakAuras/Libs/LibStub/tests/test3.lua | 14 - WeakAuras/Libs/LibStub/tests/test4.lua | 41 - WeakAuras/Pools.lua | 350 -- WeakAuras/embeds.xml | 16 - .../Libs/AceConfig-3.0/AceConfig-3.0.lua | 58 - .../Libs/AceConfig-3.0/AceConfig-3.0.xml | 8 - .../AceConfigCmd-3.0/AceConfigCmd-3.0.lua | 787 ---- .../AceConfigCmd-3.0/AceConfigCmd-3.0.xml | 4 - .../AceConfigDialog-3.0.lua | 2037 ---------- .../AceConfigDialog-3.0.xml | 4 - .../AceConfigRegistry-3.0.lua | 372 -- .../AceConfigRegistry-3.0.xml | 4 - .../BackgroundWidget.lua | 235 -- .../BorderWidget.lua | 230 -- .../FontWidget.lua | 216 - .../SoundWidget.lua | 264 -- .../StatusbarWidget.lua | 233 -- .../prototypes.lua | 266 -- .../AceGUI-3.0-SharedMediaWidgets/widget.xml | 9 - .../Libs/AceGUI-3.0/AceGUI-3.0.lua | 1024 ----- .../Libs/AceGUI-3.0/AceGUI-3.0.xml | 28 - .../AceGUIContainer-BlizOptionsGroup.lua | 143 - .../widgets/AceGUIContainer-DropDownGroup.lua | 157 - .../widgets/AceGUIContainer-Frame.lua | 318 -- .../widgets/AceGUIContainer-InlineGroup.lua | 103 - .../widgets/AceGUIContainer-ScrollFrame.lua | 215 - .../widgets/AceGUIContainer-SimpleGroup.lua | 69 - .../widgets/AceGUIContainer-TabGroup.lua | 535 --- .../widgets/AceGUIContainer-TreeGroup.lua | 719 ---- .../widgets/AceGUIContainer-Window.lua | 336 -- .../widgets/AceGUIWidget-Button.lua | 103 - .../widgets/AceGUIWidget-CheckBox.lua | 292 -- .../widgets/AceGUIWidget-ColorPicker.lua | 230 -- .../widgets/AceGUIWidget-DropDown-Items.lua | 471 --- .../widgets/AceGUIWidget-DropDown.lua | 732 ---- .../widgets/AceGUIWidget-EditBox.lua | 260 -- .../widgets/AceGUIWidget-Heading.lua | 78 - .../AceGUI-3.0/widgets/AceGUIWidget-Icon.lua | 140 - .../widgets/AceGUIWidget-InteractiveLabel.lua | 94 - .../widgets/AceGUIWidget-Keybinding.lua | 244 -- .../AceGUI-3.0/widgets/AceGUIWidget-Label.lua | 179 - .../widgets/AceGUIWidget-MultiLineEditBox.lua | 369 -- .../widgets/AceGUIWidget-Slider.lua | 280 -- WeakAurasOptions/WeakAurasOptions.toc | 1 - WeakAurasOptions/embeds.xml | 6 - 106 files changed, 27511 deletions(-) delete mode 100644 WeakAuras/Libs/AceComm-3.0/AceComm-3.0.lua delete mode 100644 WeakAuras/Libs/AceComm-3.0/AceComm-3.0.xml delete mode 100644 WeakAuras/Libs/AceComm-3.0/ChatThrottleLib.lua delete mode 100644 WeakAuras/Libs/AceSerializer-3.0/AceSerializer-3.0.lua delete mode 100644 WeakAuras/Libs/AceSerializer-3.0/AceSerializer-3.0.xml delete mode 100644 WeakAuras/Libs/AceTimer-3.0/AceTimer-3.0.lua delete mode 100644 WeakAuras/Libs/AceTimer-3.0/AceTimer-3.0.xml delete mode 100644 WeakAuras/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua delete mode 100644 WeakAuras/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml delete mode 100644 WeakAuras/Libs/LibCompress/LibCompress.lua delete mode 100644 WeakAuras/Libs/LibCompress/LibCompress.toc delete mode 100644 WeakAuras/Libs/LibCompress/lib.xml delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/IconAlert.blp delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/IconAlertAnts.blp delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.toc delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.xml delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/README.md delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/UIActionBarFX.blp delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/am_29.blp delete mode 100644 WeakAuras/Libs/LibCustomGlow-1.0/artifacts.blp delete mode 100644 WeakAuras/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua delete mode 100644 WeakAuras/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua delete mode 100644 WeakAuras/Libs/LibDataBroker-1.1/README.textile delete mode 100644 WeakAuras/Libs/LibDeflate/LICENSE.txt delete mode 100644 WeakAuras/Libs/LibDeflate/LibDeflate.lua delete mode 100644 WeakAuras/Libs/LibDeflate/LibDeflate.toc delete mode 100644 WeakAuras/Libs/LibDeflate/lib.xml delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/AceTimer-3.0/AceTimer-3.0.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/AceTimer-3.0/AceTimer-3.0.xml delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/CallbackHandler-1.0/CallbackHandler-1.0.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/CallbackHandler-1.0/CallbackHandler-1.0.xml delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LICENCE.txt delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.toc delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.xml delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibStub/LibStub.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibStub/LibStub.toc delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibStub/tests/test.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibStub/tests/test2.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibStub/tests/test3.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/LibStub/tests/test4.lua delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/README.md delete mode 100644 WeakAuras/Libs/LibGetFrame-1.0/stylua.toml delete mode 100644 WeakAuras/Libs/LibGroupTalents-1.0/LibGroupTalents-1.0.lua delete mode 100644 WeakAuras/Libs/LibGroupTalents-1.0/LibGroupTalents-1.0.toc delete mode 100644 WeakAuras/Libs/LibGroupTalents-1.0/LibTalentQuery-1.0.lua delete mode 100644 WeakAuras/Libs/LibGroupTalents-1.0/lib.xml delete mode 100644 WeakAuras/Libs/LibRangeCheck-2.0/LibRangeCheck-2.0.lua delete mode 100644 WeakAuras/Libs/LibSerialize/LibSerialize.lua delete mode 100644 WeakAuras/Libs/LibSerialize/lib.xml delete mode 100644 WeakAuras/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua delete mode 100644 WeakAuras/Libs/LibSharedMedia-3.0/lib.xml delete mode 100644 WeakAuras/Libs/LibSpellRange-1.0/LibSpellRange-1.0.lua delete mode 100644 WeakAuras/Libs/LibSpellRange-1.0/LibSpellRange-1.0.toc delete mode 100644 WeakAuras/Libs/LibSpellRange-1.0/README.md delete mode 100644 WeakAuras/Libs/LibSpellRange-1.0/lib.xml delete mode 100644 WeakAuras/Libs/LibStub/LibStub.lua delete mode 100644 WeakAuras/Libs/LibStub/LibStub.toc delete mode 100644 WeakAuras/Libs/LibStub/tests/test.lua delete mode 100644 WeakAuras/Libs/LibStub/tests/test2.lua delete mode 100644 WeakAuras/Libs/LibStub/tests/test3.lua delete mode 100644 WeakAuras/Libs/LibStub/tests/test4.lua delete mode 100644 WeakAuras/Pools.lua delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfig-3.0.lua delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfig-3.0.xml delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua delete mode 100644 WeakAurasOptions/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/AceGUI-3.0.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/AceGUI-3.0.xml delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua delete mode 100644 WeakAurasOptions/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua delete mode 100644 WeakAurasOptions/embeds.xml diff --git a/WeakAuras/Libs/AceComm-3.0/AceComm-3.0.lua b/WeakAuras/Libs/AceComm-3.0/AceComm-3.0.lua deleted file mode 100644 index 00e713b..0000000 --- a/WeakAuras/Libs/AceComm-3.0/AceComm-3.0.lua +++ /dev/null @@ -1,308 +0,0 @@ ---- **AceComm-3.0** allows you to send messages of unlimited length over the addon comm channels. --- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\ --- **ChatThrottleLib** is of course being used to avoid being disconnected by the server. --- --- **AceComm-3.0** can be embeded into your addon, either explicitly by calling AceComm:Embed(MyAddon) or by --- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object --- and can be accessed directly, without having to explicitly call AceComm itself.\\ --- It is recommended to embed AceComm, otherwise you'll have to specify a custom `self` on all calls you --- make into AceComm. --- @class file --- @name AceComm-3.0 --- @release $Id$ - ---[[ AceComm-3.0 - -TODO: Time out old data rotting around from dead senders? Not a HUGE deal since the number of possible sender names is somewhat limited. - -]] - -local CallbackHandler = LibStub("CallbackHandler-1.0") -local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib") - -local MAJOR, MINOR = "AceComm-3.0", 12 -local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR) - -if not AceComm then return end - --- Lua APIs -local type, next, pairs, tostring = type, next, pairs, tostring -local strsub, strfind = string.sub, string.find -local tinsert, tconcat = table.insert, table.concat -local error, assert = error, assert - --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: LibStub, DEFAULT_CHAT_FRAME, geterrorhandler - -AceComm.embeds = AceComm.embeds or {} - --- for my sanity and yours, let's give the message type bytes some names -local MSG_MULTI_FIRST = "\001" -local MSG_MULTI_NEXT = "\002" -local MSG_MULTI_LAST = "\003" - -AceComm.multipart_origprefixes = AceComm.multipart_origprefixes or {} -- e.g. "Prefix\001"="Prefix", "Prefix\002"="Prefix" -AceComm.multipart_reassemblers = AceComm.multipart_reassemblers or {} -- e.g. "Prefix\001"="OnReceiveMultipartFirst" - --- the multipart message spool: indexed by a combination of sender+distribution+ -AceComm.multipart_spool = AceComm.multipart_spool or {} - ---- Register for Addon Traffic on a specified prefix --- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent) --- @param method Callback to call on message reception: Function reference, or method name (string) to call on self. Defaults to "OnCommReceived" -function AceComm:RegisterComm(prefix, method) - if method == nil then - method = "OnCommReceived" - end - - return AceComm._RegisterComm(self, prefix, method) -- created by CallbackHandler -end - -local warnedPrefix=false - ---- Send a message over the Addon Channel --- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent) --- @param text Data to send, nils (\000) not allowed. Any length. --- @param distribution Addon channel, e.g. "RAID", "GUILD", etc; see SendAddonMessage API --- @param target Destination for some distributions; see SendAddonMessage API --- @param prio OPTIONAL: ChatThrottleLib priority, "BULK", "NORMAL" or "ALERT". Defaults to "NORMAL". --- @param callbackFn OPTIONAL: callback function to be called as each chunk is sent. receives 3 args: the user supplied arg (see next), the number of bytes sent so far, and the number of bytes total to send. --- @param callbackArg: OPTIONAL: first arg to the callback function. nil will be passed if not specified. -function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callbackFn, callbackArg) - prio = prio or "NORMAL" -- pasta's reference implementation had different prio for singlepart and multipart, but that's a very bad idea since that can easily lead to out-of-sequence delivery! - if not( type(prefix)=="string" and - type(text)=="string" and - type(distribution)=="string" and - (target==nil or type(target)=="string" or type(target)=="number") and - (prio=="BULK" or prio=="NORMAL" or prio=="ALERT") - ) then - error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2) - end - - if strfind(prefix, "[\001-\009]") then - if strfind(prefix, "[\001-\003]") then - error("SendCommMessage: Characters \\001--\\003 in prefix are reserved for AceComm metadata", 2) - elseif not warnedPrefix then - -- I have some ideas about future extensions that require more control characters /mikk, 20090808 - geterrorhandler()("SendCommMessage: Heads-up developers: Characters \\004--\\009 in prefix are reserved for AceComm future extension") - warnedPrefix = true - end - end - - - local textlen = #text - local maxtextlen = 254 - #prefix -- 254 is the max length of prefix + text that can be sent in one message - local queueName = prefix..distribution..(target or "") - - local ctlCallback = nil - if callbackFn then - ctlCallback = function(sent) - return callbackFn(callbackArg, sent, textlen) - end - end - - if textlen <= maxtextlen then - -- fits all in one message - CTL:SendAddonMessage(prio, prefix, text, distribution, target, queueName, ctlCallback, textlen) - else - maxtextlen = maxtextlen - 1 -- 1 extra byte for part indicator in prefix - - -- first part - local chunk = strsub(text, 1, maxtextlen) - CTL:SendAddonMessage(prio, prefix..MSG_MULTI_FIRST, chunk, distribution, target, queueName, ctlCallback, maxtextlen) - - -- continuation - local pos = 1+maxtextlen - local prefix2 = prefix..MSG_MULTI_NEXT - - while pos+maxtextlen <= textlen do - chunk = strsub(text, pos, pos+maxtextlen-1) - CTL:SendAddonMessage(prio, prefix2, chunk, distribution, target, queueName, ctlCallback, pos+maxtextlen-1) - pos = pos + maxtextlen - end - - -- final part - chunk = strsub(text, pos) - CTL:SendAddonMessage(prio, prefix..MSG_MULTI_LAST, chunk, distribution, target, queueName, ctlCallback, textlen) - end -end - - ----------------------------------------- --- Message receiving ----------------------------------------- - -do - local compost = setmetatable({}, {__mode = "k"}) - local function new() - local t = next(compost) - if t then - compost[t]=nil - for i=#t,3,-1 do -- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten - t[i]=nil - end - return t - end - - return {} - end - - local function lostdatawarning(prefix,sender,where) - DEFAULT_CHAT_FRAME:AddMessage(MAJOR..": Warning: lost network data regarding '"..tostring(prefix).."' from '"..tostring(sender).."' (in "..where..")") - end - - function AceComm:OnReceiveMultipartFirst(prefix, message, distribution, sender) - local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender - local spool = AceComm.multipart_spool - - --[[ - if spool[key] then - lostdatawarning(prefix,sender,"First") - -- continue and overwrite - end - --]] - - spool[key] = message -- plain string for now - end - - function AceComm:OnReceiveMultipartNext(prefix, message, distribution, sender) - local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender - local spool = AceComm.multipart_spool - local olddata = spool[key] - - if not olddata then - --lostdatawarning(prefix,sender,"Next") - return - end - - if type(olddata)~="table" then - -- ... but what we have is not a table. So make it one. (Pull a composted one if available) - local t = new() - t[1] = olddata -- add old data as first string - t[2] = message -- and new message as second string - spool[key] = t -- and put the table in the spool instead of the old string - else - tinsert(olddata, message) - end - end - - function AceComm:OnReceiveMultipartLast(prefix, message, distribution, sender) - local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender - local spool = AceComm.multipart_spool - local olddata = spool[key] - - if not olddata then - --lostdatawarning(prefix,sender,"End") - return - end - - spool[key] = nil - - if type(olddata) == "table" then - -- if we've received a "next", the spooled data will be a table for rapid & garbage-free tconcat - tinsert(olddata, message) - AceComm.callbacks:Fire(prefix, tconcat(olddata, ""), distribution, sender) - compost[olddata] = true - else - -- if we've only received a "first", the spooled data will still only be a string - AceComm.callbacks:Fire(prefix, olddata..message, distribution, sender) - end - end -end - - - - - - ----------------------------------------- --- Embed CallbackHandler ----------------------------------------- - -if not AceComm.callbacks then - -- ensure that 'prefix to watch' table is consistent with registered - -- callbacks - AceComm.__prefixes = {} - - AceComm.callbacks = CallbackHandler:New(AceComm, - "_RegisterComm", - "UnregisterComm", - "UnregisterAllComm") -end - -function AceComm.callbacks:OnUsed(target, prefix) - AceComm.multipart_origprefixes[prefix..MSG_MULTI_FIRST] = prefix - AceComm.multipart_reassemblers[prefix..MSG_MULTI_FIRST] = "OnReceiveMultipartFirst" - - AceComm.multipart_origprefixes[prefix..MSG_MULTI_NEXT] = prefix - AceComm.multipart_reassemblers[prefix..MSG_MULTI_NEXT] = "OnReceiveMultipartNext" - - AceComm.multipart_origprefixes[prefix..MSG_MULTI_LAST] = prefix - AceComm.multipart_reassemblers[prefix..MSG_MULTI_LAST] = "OnReceiveMultipartLast" -end - -function AceComm.callbacks:OnUnused(target, prefix) - AceComm.multipart_origprefixes[prefix..MSG_MULTI_FIRST] = nil - AceComm.multipart_reassemblers[prefix..MSG_MULTI_FIRST] = nil - - AceComm.multipart_origprefixes[prefix..MSG_MULTI_NEXT] = nil - AceComm.multipart_reassemblers[prefix..MSG_MULTI_NEXT] = nil - - AceComm.multipart_origprefixes[prefix..MSG_MULTI_LAST] = nil - AceComm.multipart_reassemblers[prefix..MSG_MULTI_LAST] = nil -end - -local function OnEvent(this, event, ...) - if event == "CHAT_MSG_ADDON" then - local prefix,message,distribution,sender = ... - local reassemblername = AceComm.multipart_reassemblers[prefix] - if reassemblername then - -- multipart: reassemble - local aceCommReassemblerFunc = AceComm[reassemblername] - local origprefix = AceComm.multipart_origprefixes[prefix] - aceCommReassemblerFunc(AceComm, origprefix, message, distribution, sender) - else - -- single part: fire it off immediately and let CallbackHandler decide if it's registered or not - AceComm.callbacks:Fire(prefix, message, distribution, sender) - end - else - assert(false, "Received "..tostring(event).." event?!") - end -end - -AceComm.frame = AceComm.frame or CreateFrame("Frame", "AceComm30Frame") -AceComm.frame:SetScript("OnEvent", OnEvent) -AceComm.frame:UnregisterAllEvents() -AceComm.frame:RegisterEvent("CHAT_MSG_ADDON") - - ----------------------------------------- --- Base library stuff ----------------------------------------- - -local mixins = { - "RegisterComm", - "UnregisterComm", - "UnregisterAllComm", - "SendCommMessage", -} - --- Embeds AceComm-3.0 into the target object making the functions from the mixins list available on target:.. --- @param target target object to embed AceComm-3.0 in -function AceComm:Embed(target) - for k, v in pairs(mixins) do - target[v] = self[v] - end - self.embeds[target] = true - return target -end - -function AceComm:OnEmbedDisable(target) - target:UnregisterAllComm() -end - --- Update embeds -for target, v in pairs(AceComm.embeds) do - AceComm:Embed(target) -end diff --git a/WeakAuras/Libs/AceComm-3.0/AceComm-3.0.xml b/WeakAuras/Libs/AceComm-3.0/AceComm-3.0.xml deleted file mode 100644 index 09e8d87..0000000 --- a/WeakAuras/Libs/AceComm-3.0/AceComm-3.0.xml +++ /dev/null @@ -1,5 +0,0 @@ - -