diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.lua b/Libs/AceAddon-3.0/AceAddon-3.0.lua index 46fde43..0ea93d1 100755 --- a/Libs/AceAddon-3.0/AceAddon-3.0.lua +++ b/Libs/AceAddon-3.0/AceAddon-3.0.lua @@ -28,7 +28,7 @@ -- end -- @class file -- @name AceAddon-3.0.lua --- @release $Id: AceAddon-3.0.lua 1238 2020-08-28 16:18:42Z nevcairiel $ +-- @release $Id: AceAddon-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $ local MAJOR, MINOR = "AceAddon-3.0", 13 local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) @@ -49,10 +49,6 @@ local select, pairs, next, type, unpack = select, pairs, next, type, unpack local loadstring, assert, error = loadstring, assert, error local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget --- 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, IsLoggedIn, geterrorhandler - --[[ xpcall safecall implementation ]] diff --git a/Libs/AceConsole-3.0/AceConsole-3.0.lua b/Libs/AceConsole-3.0/AceConsole-3.0.lua index 4cd2445..8ce5f8b 100644 --- a/Libs/AceConsole-3.0/AceConsole-3.0.lua +++ b/Libs/AceConsole-3.0/AceConsole-3.0.lua @@ -2,14 +2,14 @@ -- You can register slash commands to your custom functions and use the `GetArgs` function to parse them -- to your addons individual needs. -- --- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(MyAddon) or by +-- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole: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 AceConsole itself.\\ -- It is recommended to embed AceConsole, otherwise you'll have to specify a custom `self` on all calls you -- make into AceConsole. -- @class file -- @name AceConsole-3.0 --- @release $Id: AceConsole-3.0.lua 1143 2016-07-11 08:52:03Z nevcairiel $ +-- @release $Id: AceConsole-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $ local MAJOR,MINOR = "AceConsole-3.0", 7 local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR) @@ -29,10 +29,6 @@ local max = math.max -- WoW APIs local _G = _G --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: DEFAULT_CHAT_FRAME, SlashCmdList, hash_SlashCmdList - local tmp={} local function Print(self,frame,...) local n=0 @@ -84,11 +80,11 @@ end -- @param persist if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true) function AceConsole:RegisterChatCommand( command, func, persist ) if type(command)~="string" then error([[Usage: AceConsole:RegisterChatCommand( "command", func[, persist ]): 'command' - expected a string]], 2) end - + if persist==nil then persist=true end -- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk - + local name = "ACECONSOLE_"..command:upper() - + if type( func ) == "string" then SlashCmdList[name] = function(input, editBox) self[func](self, input, editBox) @@ -132,9 +128,9 @@ local function nils(n, ...) return ... end end - ---- Retreive one or more space-separated arguments from a string. + +--- Retreive one or more space-separated arguments from a string. -- Treats quoted strings and itemlinks as non-spaced. -- @param str The raw argument string -- @param numargs How many arguments to get (default 1) @@ -144,7 +140,7 @@ end function AceConsole:GetArgs(str, numargs, startpos) numargs = numargs or 1 startpos = max(startpos or 1, 1) - + local pos=startpos -- find start of new arg @@ -169,24 +165,24 @@ function AceConsole:GetArgs(str, numargs, startpos) else delim_or_pipe="([| ])" end - + startpos = pos - + while true do -- find delimiter or hyperlink - local ch,_ + local _ pos,_,ch = strfind(str, delim_or_pipe, pos) - + if not pos then break end - + if ch=="|" then -- some kind of escape - + if strsub(str,pos,pos+1)=="|H" then -- It's a |H....|hhyper link!|h pos=strfind(str, "|h", pos+2) -- first |h if not pos then break end - + pos=strfind(str, "|h", pos+2) -- second |h if not pos then break end elseif strsub(str,pos, pos+1) == "|T" then @@ -194,16 +190,16 @@ function AceConsole:GetArgs(str, numargs, startpos) pos=strfind(str, "|t", pos+2) if not pos then break end end - + pos=pos+2 -- skip past this escape (last |h if it was a hyperlink) - + else -- found delimiter, done with this arg return strsub(str, startpos, pos-1), AceConsole:GetArgs(str, numargs-1, pos+1) end - + end - + -- search aborted, we hit end of string. return it all as one argument. (yes, even if it's an unterminated quote or hyperlink) return strsub(str, startpos), nils(numargs-1, 1e9) end @@ -214,10 +210,10 @@ end local mixins = { "Print", "Printf", - "RegisterChatCommand", + "RegisterChatCommand", "UnregisterChatCommand", "GetArgs", -} +} -- Embeds AceConsole into the target object making the functions from the mixins list available on target:.. -- @param target target object to embed AceBucket in diff --git a/Libs/AceConsole-3.0/AceConsole-3.0.xml b/Libs/AceConsole-3.0/AceConsole-3.0.xml index e3e8b6f..f6ae8a6 100644 --- a/Libs/AceConsole-3.0/AceConsole-3.0.xml +++ b/Libs/AceConsole-3.0/AceConsole-3.0.xml @@ -1,4 +1,4 @@