# HG changeset patch # User Zerotorescue # Date 1283510616 -7200 # Node ID 823e33465b6efd9ad8f17734a53b3c205cc9e3fb Initial commit diff -r 000000000000 -r 823e33465b6e Core.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Core.lua Fri Sep 03 12:43:36 2010 +0200 @@ -0,0 +1,728 @@ +MailOpener = LibStub("AceAddon-3.0"):NewAddon("MailOpener", "AceEvent-3.0", "AceTimer-3.0"); + +local enabled = true; +local MailOpenerConfig, lastAmount, lastQuickAuctionsStatus, opening, freshList, mailboxEmptySoundPlayed; + +function MailOpener:OnInitialize() + local defaults = { + global = { + uses = 0; + }, + profile = { + general = { + defaultStatus = "_enabled", + defaultQAStatus = "__remember", + continueOpeningStackableItems = false, + autoDisableQAAutoMail = true, + autoReenableQAAutoMail = false, + autoSetBackQAAutoMail = true, + continueOpening = false, + waitTime = 5, + initialDelay = 0.5, + }, + modules = { + Collected = true, + }, + notifications = { + welcome = true, + bye = true, + finishedCurrentBatch = true, + mailboxIsEmpty = true, + + skipped = { + all = true, + inventoryFull = true, + keepFreeSpaceLimit = true, + GMMail = true, + COD = true, + normalGoldMail = true, + normalItemsMail = true, + AHexpired = true, + AHsuccess = true, + AHwon = true, + AHcanceled = true, + AHoutbid = true, + other = true, + }, + processed = { + all = true, + normalGoldMail = true, + normalItemsMail = true, + AHexpired = true, + AHsuccess = true, + AHwon = true, + AHcanceled = true, + AHoutbid = true, + other = true, + }, + + bagsFullSound = false, + bagsFullSoundFile = "Sound\\Spells\\SimonGame_Visual_BadPress.wav", + bagsFullSoundFileName = "Simon Error", + bagsFullSoundOnlyOnce = true, + mailboxEmptySound = false, + mailboxEmptySoundFile = "Sound\\Spells\\SimonGame_Visual_GameStart.wav", + mailboxEmptySoundFileName = "Simon Start", + mailboxEmptySoundOnlyOnce = true, + }, + }, + }; + + -- Register our saved variables database + self.db = LibStub("AceDB-3.0"):New("MailOpenerDB", defaults, true); + + -- Set these as object variables so we can use them in our modules + if select(6, GetAddOnInfo("Postal")) == nil then + self.PostalEnabled = true; + + -- Ensure this addon is loaded if AddonLoader is installed + if AddonLoader and AddonLoader.LoadAddOn and not Postal then + AddonLoader:LoadAddOn("Postal"); + end + end + + if select(6, GetAddOnInfo("QuickAuctions")) == nil then + self.QuickAuctionsEnabled = true; + + -- Ensure this addon is loaded if AddonLoader is installed + if AddonLoader and AddonLoader.LoadAddOn then + AddonLoader:LoadAddOn("QuickAuctions"); + end + end + + -- Don't enable the config module until we need it + for name, module in self:IterateModules() do + if name == "Config" then + module:SetEnabledState(false); + elseif self.db.profile.modules[name] ~= nil then + if self.db.profile.modules[name] then + self:Debug("|cff00ff00Enabling|r module: " .. name); + else + self:Debug("|cffff0000Disabling|r module: " .. name); + end + + module:SetEnabledState(self.db.profile.modules[name]); + end + end + + -- Make the open all checkbox + local check = CreateFrame("CheckButton", "cbMailOpenerEnable", MailFrame, "ChatConfigCheckButtonTemplate"); + check:SetHeight(26); + check:SetWidth(26); + check:SetChecked(enabled); + check:SetHitRectInsets(0, -80, 0, 0); + check:SetScript("OnClick", function(self) + if self:GetChecked() then + MailOpener:Enable(); + else + MailOpener:Disable(); + end + end); + check.tooltip = "Toggle Mail Opener on or off."; + check:SetPoint("TOPLEFT", MailFrame, "TOPLEFT", 68, -13) + + if self.QuickAuctionsEnabled then + -- QA is enabled so move the checkbox further to the right + + check:SetPoint("TOPLEFT", MailFrame, "TOPLEFT", 155, -13); + end + + -- Get reference to the text field + local checkboxText = _G[check:GetName() .. "Text"]; + checkboxText:SetText("Mail Opener"); + -- We like this color more + checkboxText:SetTextColor(1, 0.8, 0, 1); + + self.cbOpenAll = check; + + -- Make the config button + local button = CreateFrame("Button", "btnMailOpenerConfig", MailFrame, "UIPanelButtonTemplate") + button:SetText("Config") + button:SetHeight(23) + button:SetWidth(55) + if self.PostalEnabled then + button:SetPoint("TOPRIGHT", MailFrame, "TOPRIGHT", -75, -13); + else + button:SetPoint("TOPRIGHT", MailFrame, "TOPRIGHT", -55, -13); + end + button:SetScript("OnClick", function() + MailOpener:EnableConfigModule(); + + MailOpenerConfig:Show(); + + if MailOpener.db.global.uses >= 15 then + MailOpener:ShowBetaPopup(); + end + end); + + self.btnConfig = button; + + -- Disable the AddonLoader slash commands + SLASH_MO1 = nil; + SLASH_MAILOPEN1 = nil; + SLASH_MAILOPENER1 = nil; + + -- Register our own slash commands + SLASH_MAILOPENER1 = "/mo"; + SLASH_MAILOPENER2 = "/mailopen"; + SLASH_MAILOPENER3 = "/mailopener"; + SlashCmdList["MAILOPENER"] = function(msg) + MailOpener:EnableConfigModule(); + + MailOpenerConfig:CommandHandler(msg); + end + + -- Attempt to remove the interface options added by AddonLoader (if enabled) + if AddonLoader and AddonLoader.RemoveInterfaceOptions then + AddonLoader:RemoveInterfaceOptions("Mail Opener"); + end + + -- Now create our own options frame + local frame = CreateFrame("Frame", nil, UIParent); + frame:Hide(); + frame.name = "Mail Opener"; + frame:HookScript("OnShow", function(self) + -- Enable the config module + MailOpener:EnableConfigModule(); + + -- Load the options and add it to the blizzard interface list + MailOpenerConfig:Load(); + + -- Refresh the frame to instantly show the right options + InterfaceOptionsFrame_OpenToCategory(self.name) + end); + -- And add it to the interface options + InterfaceOptions_AddCategory(frame); + + -- If the above becomes impossible this is another way to load the config module when required due to Interface/AddOns options + --InterfaceOptionsFrameTab2:HookScript("OnClick", function() + -- -- Load the config module + -- MailOpener:EnableConfigModule(); + + -- -- Load the options and add it to the blizzard interface list + -- MailOpenerConfig:Load(); + --end); +end + +function MailOpener:OnEnable() + self:RegisterEvent("MAIL_SHOW"); + self:RegisterEvent("PLAYER_ENTERING_WORLD"); + + self.btnConfig:Show(); + + -- Reset variables + lastAmount = 0; + self.debugChannel = nil; + + self.db.global.uses = ( self.db.global.uses + 1 ); + + if self.db.global.uses == 15 then + self:ShowBetaPopup(); + end + + -- If we were toggling this addon on while the mailbox is opened we must register all events again + if MailFrame:IsVisible() then + self:MAIL_SHOW(); + end +end + +function MailOpener:OnDisable() + self:UnregisterEvent("MAIL_SHOW"); + + self.btnConfig:Hide(); + + enabled = false; + MailOpener:Stop(); +end + +-- We must disable Quick Auction's auto mail (if set up that way in the settings) before opening the mailbox or it will instantly start sending stuff +function MailOpener:PLAYER_ENTERING_WORLD() + self:UnregisterEvent("PLAYER_ENTERING_WORLD"); + + self:ToggleQAStatus(); +end + +-- Fired when the mailbox is opened +function MailOpener:MAIL_SHOW() + -- To stop the timer when the mailbox is closed + self:RegisterEvent("MAIL_CLOSED", "Stop"); + self:RegisterEvent("PLAYER_LEAVING_WORLD", "Stop"); + + -- To set the timer for when to refresh again + self:RegisterEvent("MAIL_INBOX_UPDATE"); + + -- We need to know when opening has completed + self:RegisterMessage("MO_OPEN_COMPLETE"); + + self:Debug("defaultStatus:" .. self.db.profile.general.defaultStatus); + -- Change the mail opening status according to our settings + if self.db.profile.general.defaultStatus == "_enabled" then + enabled = true; + else + enabled = false; + end + self.cbOpenAll:SetChecked(enabled); + + self:ToggleQAStatus(); + + -- Hide the InboxTooMuchMail warning to allow room for our mail remaining info line + InboxTooMuchMail:Hide() + InboxTooMuchMail.Show = function() end + + if self.QuickAuctionsEnabled then + -- Go through all children of the mail frame to find the post button + local kids = { InboxFrame:GetChildren() }; + + for _, child in ipairs(kids) do + if child then + local width = floor( child:GetWidth() + .5 ); + local height = floor( child:GetHeight() + .5 ); + + -- The open all button has a static width and height + if width == 130 and height == 24 then + child:Hide(); + break; + end + end + end + end + + if self.db.profile.notifications.welcome then + -- Welcome notification + local _, c = UnitClass("player"); + c = RAID_CLASS_COLORS[c]; + c = string.format("|cff%02x%02x%02x", c.r * 255 + 0.5, c.g * 255 + 0.5, c.b * 255 + 0.5); + + print("|cff15ff00Mail Opener|r: Welcome back "..c..UnitName("player").."|r. Requesting new mail from the local Postal Service, your mail will automatically be opened when it becomes available."); + end + + mailboxEmptySoundPlayed = nil; + + self:Recheck(); + + if self.db.profile.general.continueOpening then + self:ScheduleOpen(true); + end +end + +-- Fired after a successful server sync +-- Fired when mail is deleted (which happens after taking all attachments from a mail sent by the game) +function MailOpener:MAIL_INBOX_UPDATE() + local current, total = GetInboxNumItems(); + + local tempLastAmount = lastAmount; + lastAmount = current; + + if current ~= tempLastAmount then + self:Debug("MAIL_INBOX_UPDATE - lastAmount:" .. tempLastAmount .. " - current:" .. current); + end + + if current > tempLastAmount then + -- New messages arrived in our mailbox, so this was a refresh, so set a timer + + -- Yell that we successfully synced with the server + self:SendMessage("MO_SERVER_SYNCED"); + + -- This list is fresh + freshList = true; + mailboxEmptySoundPlayed = nil; + + -- Stop previous timer + self:CancelTimer(self.tmrRecheck, true); + -- More will arrive in 60 seconds + self.tmrRecheck = self:ScheduleTimer(function() + self:Debug("tmrRecheck 61 finished"); + + -- We can get a fresh list now, so query the server + freshList = false; + + -- Look for mail + self:Recheck(); + end, 61); + self:Debug("tmrRecheck 61"); + + if not IsShiftKeyDown() then + -- Allow overriding of mailopening with the shift key + + -- Open the current mail + self:ScheduleOpen(false); + end + elseif (current == 50 and tempLastAmount == 50) then + if not IsShiftKeyDown() then + -- Allow overriding of mailopening with the shift key + + -- Open the current mail + self:ScheduleOpen(false); + end + end + + tempLastAmount = current; +end + +function MailOpener:ScheduleOpen(continued) + if lastAmount > 0 then + local waitTime; + if continued then + waitTime = self.db.profile.general.waitTime; + else + -- Even though this is not a continuation and should be instant, we set a .5 second timer to prevent multiple calls of the OpenNow function + waitTime = self.db.profile.general.initialDelay; + end + + -- Stop previous timer + self:CancelTimer(self.tmrOpenNow, true); + -- Schedule the next open + self.tmrOpenNow = self:ScheduleTimer("OpenNow", waitTime); + end +end + +function MailOpener:OpenNow() + self:Debug("OpenNow (" .. ((opening and "1") or "0") .. ")"); + if not opening and MailFrame:IsVisible() then + self:Debug("OpenNow"); + + -- BeanCounter is the only addon hiding the mail close button while busy, so we can look for that + local BeanCounterActive = not InboxCloseButton:IsVisible(); + + if not BeanCounterActive then + -- BeanCounter is INACTIVE + + self:CancelTimer(self.tmrTryAgain, true); -- Insurance + + if QuickAuctionsAutoMail then + -- Remember the last known quick auctions status + lastQuickAuctionsStatus = QuickAuctionsAutoMail:GetChecked(); + end + if self.db.profile.general.autoDisableQAAutoMail and self.QuickAuctionsEnabled and QuickAuctionsAutoMail and QuickAuctionsAutoMail:GetChecked() then + -- If auto disable "QA Auto mail" is enabled and QA's auto mail is currently toggled on, turn it off + -- We need to do this with a :click to trigger the right events + + self:Debug("Turning automail |cffff0000off|r."); + + QuickAuctionsAutoMail:Click(); + end + + opening = true; + + self:Debug("MO_OPEN_MAIL"); + + -- Summon the mail opening gods + self:SendMessage("MO_OPEN_MAIL"); + else + -- BeanCounter is ACTIVE + self:Debug("BeanCounter active, waiting .5 seconds..."); + + self:CancelTimer(self.tmrTryAgain, true); -- Insurance + -- Wait with summoning until BeanCounter is done, try again every 0.5 seconds + self.tmrTryAgain = self:ScheduleTimer("OpenNow", 0.5); + end + end +end + +function MailOpener:MO_OPEN_COMPLETE() + opening = false; + + local current, total = GetInboxNumItems(); + + if (total - current) == 0 then + -- Play the sound + if self.db.profile.notifications.mailboxEmptySound and (not MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce or not mailboxEmptySoundPlayed) then + PlaySoundFile(self.db.profile.notifications.mailboxEmptySoundFile); + mailboxEmptySoundPlayed = true; + end + end + + if self.db.profile.general.autoReenableQAAutoMail and self.QuickAuctionsEnabled and QuickAuctionsAutoMail and not QuickAuctionsAutoMail:GetChecked() then + -- If auto re-enable "QA Auto mail" is enabled and QA's auto mail is currently toggled OFF, turn it on + -- We need to do this with a :click to trigger the right events + + self:Debug("Turning automail |cff00ff00on|r."); + + QuickAuctionsAutoMail:Click(); + elseif self.db.profile.general.autoSetBackQAAutoMail and self.QuickAuctionsEnabled and QuickAuctionsAutoMail and lastQuickAuctionsStatus ~= QuickAuctionsAutoMail:GetChecked() then + -- If auto set back "QA Auto mail" is enabled and QA's auto mail is currently not the same as it was before starting, toggle it + -- We need to do this with a :click to trigger the right events + + if lastQuickAuctionsStatus then + self:Debug("Turning automail |cff00ff00on|r."); + else + self:Debug("Turning automail |cffff0000off|r."); + end + + QuickAuctionsAutoMail:Click(); + end + + if self.db.profile.general.continueOpening then + self:ScheduleOpen(true); + end +end + +-- Run another CheckInbox +function MailOpener:Recheck() + self:Debug("|cffffff00Recheck|r"); + + -- Freshlist prevents this from being run too often + -- It is set to true after a server sync + -- and set to false 61 seconds afterwards with a recheck called instantly after it + if not freshList and MailFrame:IsVisible() then + self:Debug("|cff00ff00Recheck|r"); + + -- If this isn't a fresh list (so messages weren't received within the last 60 seconds) and the mailbox wasn't closed + + -- BeanCounter is the only addon hiding the mail close button while busy, so we can look for that + local BeanCounterActive = not InboxCloseButton:IsVisible(); + + if not BeanCounterActive then + -- Query the server + CheckInbox(); + end + + -- Stop previous timer + self:CancelTimer(self.tmrRecheck, true); + -- Keep trying until it works + self.tmrRecheck = self:ScheduleTimer("Recheck", 2); + + self:Debug("tmrRecheck 2"); + end +end + +-- Stop checking for new mail and unregister the events we needed +function MailOpener:Stop() + if self.db.profile.notifications.bye then + print("|cff15ff00Mail Opener|r: Have a nice day. :)"); + end + + opening = false; + + -- We won't need this anymore + self:UnregisterEvent("MAIL_CLOSED"); + self:UnregisterEvent("PLAYER_LEAVING_WORLD"); + self:UnregisterEvent("MAIL_INBOX_UPDATE"); + + -- Messages + self:UnregisterMessage("MO_OPEN_COMPLETE"); + + -- Timers + self:CancelTimer(self.tmrTryAgain, true); + self:CancelTimer(self.tmrOpenNow, true); + + -- If we wait with disabling QA automail until MAIL_SHOW, QA will beat us to it and already start sending stuff + self:ToggleQAStatus(); +end + +function MailOpener:Debug(t) + if not self.debugChannel and self.debugChannel ~= false then + -- We want to check just once, so if you add a debug channel later just do a /reload (registering an event for this is wasted resources) + self.debugChannel = false; + + for i = 1, NUM_CHAT_WINDOWS do + local name = GetChatWindowInfo(i); + + if name:upper() == "DEBUG" then + self.debugChannel = _G["ChatFrame" .. i]; + end + end + end + + if self.debugChannel then + self.debugChannel:AddMessage(t); + end +end + +-- Enable our config module if it's disabled and make a reference to it +function MailOpener:EnableConfigModule() + if not MailOpenerConfig then + MailOpenerConfig = self:GetModule("Config"); + MailOpenerConfig:Enable(); + end +end + +-- Toggle Postal's opening modules on or off +function MailOpener:TogglePostalModule(name, status) + if MailOpener.PostalEnabled and Postal then + -- Postal must be enabled + + -- Remember the setting in Postal + Postal.db.profile.ModuleEnabledState[name] = status; + + -- Toggle module + if status then + Postal:GetModule(name):Enable(); + else + Postal:GetModule(name):Disable(); + end + end +end + +-- Change Quick Auction's auto mail status based on our prefered settings +function MailOpener:ToggleQAStatus() + self:Debug("defaultQAStatus:" .. self.db.profile.general.defaultQAStatus); + + if self.QuickAuctionsEnabled and self.db.profile.general.defaultQAStatus ~= "__remember" and QuickAuctionsAutoMail then + if self.db.profile.general.defaultQAStatus == "_enabled" and not QuickAuctionsAutoMail:GetChecked() then + self:Debug("Turning automail |cff00ff00on|r."); + + QuickAuctionsAutoMail:Click(); + elseif self.db.profile.general.defaultQAStatus == "disabled" and QuickAuctionsAutoMail:GetChecked() then + self:Debug("Turning automail |cffff0000off|r."); + + QuickAuctionsAutoMail:Click(); + end + end +end + +function MailOpener:FormatMoney(copper) + local gold = floor( copper / 10000 ); + local silver = floor( ( copper - ( gold * 10000 ) ) / 100 ); + local copper = mod(copper, 100); + + if gold > 0 then + return format(GOLD_AMOUNT_TEXTURE .. " " .. SILVER_AMOUNT_TEXTURE .. " " .. COPPER_AMOUNT_TEXTURE, gold, 0, 0, silver, 0, 0, copper, 0, 0); + elseif silver > 0 then + return format(SILVER_AMOUNT_TEXTURE .. " " .. COPPER_AMOUNT_TEXTURE, silver, 0, 0, copper, 0, 0); + else + return format(COPPER_AMOUNT_TEXTURE, copper, 0, 0); + end +end + +StaticPopupDialogs["MailOpenerCopyWindow"] = { + text = "Please CTRL-C to copy.", + button2 = CLOSE, + hasEditBox = 1, + hasWideEditBox = 1, + OnShow = function() + local editBox = _G[this:GetName().."WideEditBox"]; + if editBox and MailOpener.currentPopupContents then + editBox:SetText(MailOpener.currentPopupContents); + editBox:SetFocus(); + editBox:HighlightText(0); + end + + -- Position the close button in the middle + local button = _G[this:GetName().."Button2"]; + if button then + -- Remove previous know position + button:ClearAllPoints(); + button:SetWidth(200); + -- Reposition in the center + button:SetPoint("CENTER", editBox, "CENTER", 0, -30); + end + end, + EditBoxOnEscapePressed = function() + this:GetParent():Hide(); + end, + timeout = 0, + whileDead = 1, + hideOnEscape = 1, + maxLetters = 1024, +} + +function MailOpener:ShowBetaPopup() + function TableDump(key, val, jumps) + local cache = ""; + + if not jumps then + jumps = 0; + end + + local spacer = ""; + if jumps > 0 then + for i = 1, jumps do + spacer = spacer .. " "; + end + end + + if type(val) == "table" then + cache = cache .. spacer .. key .. " = {\n"; + foreach(val, function(k, v) + cache = cache .. TableDump(k, v, (jumps + 1)); + end); + cache = cache .. spacer .. "},\n"; + else + cache = cache .. spacer .. key .. " = " .. tostring(val) .. ",\n"; + end + + return cache; + end + + local cache = ""; + foreach(MailOpener.db.profile, function(k, v) + cache = cache .. TableDump(k, v, 0); + end); + + local AceGUI = LibStub("AceGUI-3.0"); + local frame = AceGUI:Create("Frame"); + frame:SetTitle("Mail Opener ALPHA"); + frame:SetWidth(575); + frame:SetHeight(375); + + -- Add a normal description label + local desc = AceGUI:Create("Label"); + desc:SetText("|cff00ff00After you have been using Mail Opener for a while and configured it just as you want it to be, please report your favorite settings by copying the text below at either of the below links. Thanks in advance!|r\n\n"); + desc:SetFont(GameFontHighlightSmall:GetFont(), 13); + desc:SetFullWidth(true); + frame:AddChild(desc); + + -- Add a MultiLineEditBox + local settingsMLEEB = AceGUI:Create("MultiLineEditBox"); + settingsMLEEB:SetText(cache); + settingsMLEEB:SetLabel("Hit CTRL-A to select all and CTRL-C to copy the text. You can then use CTRL-V to paste."); + settingsMLEEB:SetFullWidth(true); + settingsMLEEB:SetNumLines(8); + settingsMLEEB:DisableButton(true); + settingsMLEEB:SetCallback("OnTextChanged", function() + settingsMLEEB:SetText(cache); + end); + frame:AddChild(settingsMLEEB); + + -- Empty line between the two links + local label = AceGUI:Create("Label"); + label:SetText("Please post the above text at either of these two links:"); + label:SetFullWidth(true); + frame:AddChild(label); + + local desc1 = AceGUI:Create("InteractiveLabel"); + desc1:SetText("|cff00bbbb[http://wow.curseforge.com/addons/mailopener/create-ticket/]|r"); + desc1:SetFont(GameFontHighlightSmall:GetFont(), 13); + desc1:SetFullWidth(true); + desc1:SetCallback("OnClick", function() + MailOpener.currentPopupContents = "http://wow.curseforge.com/addons/mailopener/create-ticket/"; + + StaticPopup_Show("MailOpenerCopyWindow"); + end); + desc1:SetCallback("OnEnter", function() + frame:SetStatusText("Click to copy this URL."); + end); + desc1:SetCallback("OnLeave", function() + frame:SetStatusText(""); + end); + frame:AddChild(desc1); + + -- Empty line between the two links + local spacer = AceGUI:Create("Label"); + spacer:SetText(" "); + frame:AddChild(spacer); + + local desc2 = AceGUI:Create("InteractiveLabel"); + desc2:SetText("|cff00bbbb[http://20kleveling.com/JMTCforum/posting.php?mode=reply&f=9&t=1403]|r"); + desc2:SetFont(GameFontHighlightSmall:GetFont(), 13); + desc2:SetFullWidth(true); + desc2:SetCallback("OnClick", function() + MailOpener.currentPopupContents = "http://20kleveling.com/JMTCforum/posting.php?mode=reply&f=9&t=1403"; + + StaticPopup_Show("MailOpenerCopyWindow"); + end); + desc2:SetCallback("OnEnter", function() + frame:SetStatusText("Click to copy this URL."); + end); + desc2:SetCallback("OnLeave", function() + frame:SetStatusText(""); + end); + frame:AddChild(desc2); + + -- Empty line between the two links + local label = AceGUI:Create("Label"); + label:SetText("\n\nps. You can always view this window again at a later time by clicking the \"Config\" button in the mail frame.\nps2. The information above is completely Mail Opener related. It will be used to determine the best default settings."); + label:SetFullWidth(true); + frame:AddChild(label); +end \ No newline at end of file diff -r 000000000000 -r 823e33465b6e Libs/AceAddon-3.0/AceAddon-3.0.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Libs/AceAddon-3.0/AceAddon-3.0.lua Fri Sep 03 12:43:36 2010 +0200 @@ -0,0 +1,642 @@ +--- **AceAddon-3.0** provides a template for creating addon objects. +-- It'll provide you with a set of callback functions that allow you to simplify the loading +-- process of your addon.\\ +-- Callbacks provided are:\\ +-- * **OnInitialize**, which is called directly after the addon is fully loaded. +-- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present. +-- * **OnDisable**, which is only called when your addon is manually being disabled. +-- @usage +-- -- A small (but complete) addon, that doesn't do anything, +-- -- but shows usage of the callbacks. +-- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon") +-- +-- function MyAddon:OnInitialize() +-- -- do init tasks here, like loading the Saved Variables, +-- -- or setting up slash commands. +-- end +-- +-- function MyAddon:OnEnable() +-- -- Do more initialization here, that really enables the use of your addon. +-- -- Register Events, Hook functions, Create Frames, Get information from +-- -- the game that wasn't available in OnInitialize +-- end +-- +-- function MyAddon:OnDisable() +-- -- Unhook, Unregister Events, Hide frames that you created. +-- -- You would probably only use an OnDisable if you want to +-- -- build a "standby" mode, or be able to toggle modules on/off. +-- end +-- @class file +-- @name AceAddon-3.0.lua +-- @release $Id: AceAddon-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $ + +local MAJOR, MINOR = "AceAddon-3.0", 5 +local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) + +if not AceAddon then return end -- No Upgrade needed. + +AceAddon.frame = AceAddon.frame or CreateFrame("Frame", "AceAddon30Frame") -- Our very own frame +AceAddon.addons = AceAddon.addons or {} -- addons in general +AceAddon.statuses = AceAddon.statuses or {} -- statuses of addon. +AceAddon.initializequeue = AceAddon.initializequeue or {} -- addons that are new and not initialized +AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized and waiting to be enabled +AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon + +-- Lua APIs +local tinsert, tconcat, tremove = table.insert, table.concat, table.remove +local fmt, tostring = string.format, tostring +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 +]] +local xpcall = xpcall + +local function errorhandler(err) + return geterrorhandler()(err) +end + +local function CreateDispatcher(argCount) + local code = [[ + local xpcall, eh = ... + local method, ARGS + local function call() return method(ARGS) end + + local function dispatch(func, ...) + method = func + if not method then return end + ARGS = ... + return xpcall(call, eh) + end + + return dispatch + ]] + + local ARGS = {} + for i = 1, argCount do ARGS[i] = "arg"..i end + code = code:gsub("ARGS", tconcat(ARGS, ", ")) + return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) +end + +local Dispatchers = setmetatable({}, {__index=function(self, argCount) + local dispatcher = CreateDispatcher(argCount) + rawset(self, argCount, dispatcher) + return dispatcher +end}) +Dispatchers[0] = function(func) + return xpcall(func, errorhandler) +end + +local function safecall(func, ...) + -- we check to see if the func is passed is actually a function here and don't error when it isn't + -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not + -- present execution should continue without hinderance + if type(func) == "function" then + return Dispatchers[select('#', ...)](func, ...) + end +end + +-- local functions that will be implemented further down +local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype + +-- used in the addon metatable +local function addontostring( self ) return self.name end + +--- Create a new AceAddon-3.0 addon. +-- Any libraries you specified will be embeded, and the addon will be scheduled for +-- its OnInitialize and OnEnable callbacks. +-- The final addon object, with all libraries embeded, will be returned. +-- @paramsig [object ,]name[, lib, ...] +-- @param object Table to use as a base for the addon (optional) +-- @param name Name of the addon object to create +-- @param lib List of libraries to embed into the addon +-- @usage +-- -- Create a simple addon object +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0") +-- +-- -- Create a Addon object based on the table of a frame +-- local MyFrame = CreateFrame("Frame") +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon(MyFrame, "MyAddon", "AceEvent-3.0") +function AceAddon:NewAddon(objectorname, ...) + local object,name + local i=1 + if type(objectorname)=="table" then + object=objectorname + name=... + i=2 + else + name=objectorname + end + if type(name)~="string" then + error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) + end + if self.addons[name] then + error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2) + end + + object = object or {} + object.name = name + + local addonmeta = {} + local oldmeta = getmetatable(object) + if oldmeta then + for k, v in pairs(oldmeta) do addonmeta[k] = v end + end + addonmeta.__tostring = addontostring + + setmetatable( object, addonmeta ) + self.addons[name] = object + object.modules = {} + object.defaultModuleLibraries = {} + Embed( object ) -- embed NewModule, GetModule methods + self:EmbedLibraries(object, select(i,...)) + + -- add to queue of addons to be initialized upon ADDON_LOADED + tinsert(self.initializequeue, object) + return object +end + + +--- Get the addon object by its name from the internal AceAddon registry. +-- Throws an error if the addon object cannot be found (except if silent is set). +-- @param name unique name of the addon object +-- @param silent if true, the addon is optional, silently return nil if its not found +-- @usage +-- -- Get the Addon +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +function AceAddon:GetAddon(name, silent) + if not silent and not self.addons[name] then + error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2) + end + return self.addons[name] +end + +-- - Embed a list of libraries into the specified addon. +-- This function will try to embed all of the listed libraries into the addon +-- and error if a single one fails. +-- +-- **Note:** This function is for internal use by :NewAddon/:NewModule +-- @paramsig addon, [lib, ...] +-- @param addon addon object to embed the libs in +-- @param lib List of libraries to embed into the addon +function AceAddon:EmbedLibraries(addon, ...) + for i=1,select("#", ... ) do + local libname = select(i, ...) + self:EmbedLibrary(addon, libname, false, 4) + end +end + +-- - Embed a library into the addon object. +-- This function will check if the specified library is registered with LibStub +-- and if it has a :Embed function to call. It'll error if any of those conditions +-- fails. +-- +-- **Note:** This function is for internal use by :EmbedLibraries +-- @paramsig addon, libname[, silent[, offset]] +-- @param addon addon object to embed the library in +-- @param libname name of the library to embed +-- @param silent marks an embed to fail silently if the library doesn't exist (optional) +-- @param offset will push the error messages back to said offset, defaults to 2 (optional) +function AceAddon:EmbedLibrary(addon, libname, silent, offset) + local lib = LibStub:GetLibrary(libname, true) + if not lib and not silent then + error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2) + elseif lib and type(lib.Embed) == "function" then + lib:Embed(addon) + tinsert(self.embeds[addon], libname) + return true + elseif lib then + error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2) + end +end + +--- Return the specified module from an addon object. +-- Throws an error if the addon object cannot be found (except if silent is set) +-- @name //addon//:GetModule +-- @paramsig name[, silent] +-- @param name unique name of the module +-- @param silent if true, the module is optional, silently return nil if its not found (optional) +-- @usage +-- -- Get the Addon +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- -- Get the Module +-- MyModule = MyAddon:GetModule("MyModule") +function GetModule(self, name, silent) + if not self.modules[name] and not silent then + error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2) + end + return self.modules[name] +end + +local function IsModuleTrue(self) return true end + +--- Create a new module for the addon. +-- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.\\ +-- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as +-- an addon object. +-- @name //addon//:NewModule +-- @paramsig name[, prototype|lib[, lib, ...]] +-- @param name unique name of the module +-- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional) +-- @param lib List of libraries to embed into the addon +-- @usage +-- -- Create a module with some embeded libraries +-- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0") +-- +-- -- Create a module with a prototype +-- local prototype = { OnEnable = function(self) print("OnEnable called!") end } +-- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0") +function NewModule(self, name, prototype, ...) + if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end + if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end + + if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end + + -- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well. + -- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is. + local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name)) + + module.IsModule = IsModuleTrue + module:SetEnabledState(self.defaultModuleState) + module.moduleName = name + + if type(prototype) == "string" then + AceAddon:EmbedLibraries(module, prototype, ...) + else + AceAddon:EmbedLibraries(module, ...) + end + AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries)) + + if not prototype or type(prototype) == "string" then + prototype = self.defaultModulePrototype or nil + end + + if type(prototype) == "table" then + local mt = getmetatable(module) + mt.__index = prototype + setmetatable(module, mt) -- More of a Base class type feel. + end + + safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy. + self.modules[name] = module + + return module +end + +--- Returns the real name of the addon or module, without any prefix. +-- @name //addon//:GetName +-- @paramsig +-- @usage +-- print(MyAddon:GetName()) +-- -- prints "MyAddon" +function GetName(self) + return self.moduleName or self.name +end + +--- Enables the Addon, if possible, return true or false depending on success. +-- This internally calls AceAddon:EnableAddon(), thus dispatching a OnEnable callback +-- and enabling all modules of the addon (unless explicitly disabled).\\ +-- :Enable() also sets the internal `enableState` variable to true +-- @name //addon//:Enable +-- @paramsig +-- @usage +-- -- Enable MyModule +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyModule = MyAddon:GetModule("MyModule") +-- MyModule:Enable() +function Enable(self) + self:SetEnabledState(true) + return AceAddon:EnableAddon(self) +end + +--- Disables the Addon, if possible, return true or false depending on success. +-- This internally calls AceAddon:DisableAddon(), thus dispatching a OnDisable callback +-- and disabling all modules of the addon.\\ +-- :Disable() also sets the internal `enableState` variable to false +-- @name //addon//:Disable +-- @paramsig +-- @usage +-- -- Disable MyAddon +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyAddon:Disable() +function Disable(self) + self:SetEnabledState(false) + return AceAddon:DisableAddon(self) +end + +--- Enables the Module, if possible, return true or false depending on success. +-- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object. +-- @name //addon//:EnableModule +-- @paramsig name +-- @usage +-- -- Enable MyModule using :GetModule +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyModule = MyAddon:GetModule("MyModule") +-- MyModule:Enable() +-- +-- -- Enable MyModule using the short-hand +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyAddon:EnableModule("MyModule") +function EnableModule(self, name) + local module = self:GetModule( name ) + return module:Enable() +end + +--- Disables the Module, if possible, return true or false depending on success. +-- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object. +-- @name //addon//:DisableModule +-- @paramsig name +-- @usage +-- -- Disable MyModule using :GetModule +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyModule = MyAddon:GetModule("MyModule") +-- MyModule:Disable() +-- +-- -- Disable MyModule using the short-hand +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyAddon:DisableModule("MyModule") +function DisableModule(self, name) + local module = self:GetModule( name ) + return module:Disable() +end + +--- Set the default libraries to be mixed into all modules created by this object. +-- Note that you can only change the default module libraries before any module is created. +-- @name //addon//:SetDefaultModuleLibraries +-- @paramsig lib[, lib, ...] +-- @param lib List of libraries to embed into the addon +-- @usage +-- -- Create the addon object +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon") +-- -- Configure default libraries for modules (all modules need AceEvent-3.0) +-- MyAddon:SetDefaultModuleLibraries("AceEvent-3.0") +-- -- Create a module +-- MyModule = MyAddon:NewModule("MyModule") +function SetDefaultModuleLibraries(self, ...) + if next(self.modules) then + error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2) + end + self.defaultModuleLibraries = {...} +end + +--- Set the default state in which new modules are being created. +-- Note that you can only change the default state before any module is created. +-- @name //addon//:SetDefaultModuleState +-- @paramsig state +-- @param state Default state for new modules, true for enabled, false for disabled +-- @usage +-- -- Create the addon object +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon") +-- -- Set the default state to "disabled" +-- MyAddon:SetDefaultModuleState(false) +-- -- Create a module and explicilty enable it +-- MyModule = MyAddon:NewModule("MyModule") +-- MyModule:Enable() +function SetDefaultModuleState(self, state) + if next(self.modules) then + error("Usage: SetDefaultModuleState(state): cannot change the module defaults after a module has been registered.", 2) + end + self.defaultModuleState = state +end + +--- Set the default prototype to use for new modules on creation. +-- Note that you can only change the default prototype before any module is created. +-- @name //addon//:SetDefaultModulePrototype +-- @paramsig prototype +-- @param prototype Default prototype for the new modules (table) +-- @usage +-- -- Define a prototype +-- local prototype = { OnEnable = function(self) print("OnEnable called!") end } +-- -- Set the default prototype +-- MyAddon:SetDefaultModulePrototype(prototype) +-- -- Create a module and explicitly Enable it +-- MyModule = MyAddon:NewModule("MyModule") +-- MyModule:Enable() +-- -- should print "OnEnable called!" now +-- @see NewModule +function SetDefaultModulePrototype(self, prototype) + if next(self.modules) then + error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2) + end + if type(prototype) ~= "table" then + error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2) + end + self.defaultModulePrototype = prototype +end + +--- Set the state of an addon or module +-- This should only be called before any enabling actually happend, e.g. in/before OnInitialize. +-- @name //addon//:SetEnabledState +-- @paramsig state +-- @param state the state of an addon or module (enabled=true, disabled=false) +function SetEnabledState(self, state) + self.enabledState = state +end + + +--- Return an iterator of all modules associated to the addon. +-- @name //addon//:IterateModules +-- @paramsig +-- @usage +-- -- Enable all modules +-- for name, module in MyAddon:IterateModules() do +-- module:Enable() +-- end +local function IterateModules(self) return pairs(self.modules) end + +-- Returns an iterator of all embeds in the addon +-- @name //addon//:IterateEmbeds +-- @paramsig +local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end + +--- Query the enabledState of an addon. +-- @name //addon//:IsEnabled +-- @paramsig +-- @usage +-- if MyAddon:IsEnabled() then +-- MyAddon:Disable() +-- end +local function IsEnabled(self) return self.enabledState end +local mixins = { + NewModule = NewModule, + GetModule = GetModule, + Enable = Enable, + Disable = Disable, + EnableModule = EnableModule, + DisableModule = DisableModule, + IsEnabled = IsEnabled, + SetDefaultModuleLibraries = SetDefaultModuleLibraries, + SetDefaultModuleState = SetDefaultModuleState, + SetDefaultModulePrototype = SetDefaultModulePrototype, + SetEnabledState = SetEnabledState, + IterateModules = IterateModules, + IterateEmbeds = IterateEmbeds, + GetName = GetName, +} +local function IsModule(self) return false end +local pmixins = { + defaultModuleState = true, + enabledState = true, + IsModule = IsModule, +} +-- Embed( target ) +-- target (object) - target object to embed aceaddon in +-- +-- this is a local function specifically since it's meant to be only called internally +function Embed(target) + for k, v in pairs(mixins) do + target[k] = v + end + for k, v in pairs(pmixins) do + target[k] = target[k] or v + end +end + + +-- - Initialize the addon after creation. +-- This function is only used internally during the ADDON_LOADED event +-- It will call the **OnInitialize** function on the addon object (if present), +-- and the **OnEmbedInitialize** function on all embeded libraries. +-- +-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing. +-- @param addon addon object to intialize +function AceAddon:InitializeAddon(addon) + safecall(addon.OnInitialize, addon) + + local embeds = self.embeds[addon] + for i = 1, #embeds do + local lib = LibStub:GetLibrary(embeds[i], true) + if lib then safecall(lib.OnEmbedInitialize, lib, addon) end + end + + -- we don't call InitializeAddon on modules specifically, this is handled + -- from the event handler and only done _once_ +end + +-- - Enable the addon after creation. +-- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED, +-- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons. +-- It will call the **OnEnable** function on the addon object (if present), +-- and the **OnEmbedEnable** function on all embeded libraries.\\ +-- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled. +-- +-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing. +-- Use :Enable on the addon itself instead. +-- @param addon addon object to enable +function AceAddon:EnableAddon(addon) + if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end + if self.statuses[addon.name] or not addon.enabledState then return false end + + -- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable. + self.statuses[addon.name] = true + + safecall(addon.OnEnable, addon) + + -- make sure we're still enabled before continueing + if self.statuses[addon.name] then + local embeds = self.embeds[addon] + for i = 1, #embeds do + local lib = LibStub:GetLibrary(embeds[i], true) + if lib then safecall(lib.OnEmbedEnable, lib, addon) end + end + + -- enable possible modules. + for name, module in pairs(addon.modules) do + self:EnableAddon(module) + end + end + return self.statuses[addon.name] -- return true if we're disabled +end + +-- - Disable the addon +-- Note: This function is only used internally. +-- It will call the **OnDisable** function on the addon object (if present), +-- and the **OnEmbedDisable** function on all embeded libraries.\\ +-- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled. +-- +-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing. +-- Use :Disable on the addon itself instead. +-- @param addon addon object to enable +function AceAddon:DisableAddon(addon) + if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end + if not self.statuses[addon.name] then return false end + + -- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable. + self.statuses[addon.name] = false + + safecall( addon.OnDisable, addon ) + + -- make sure we're still disabling... + if not self.statuses[addon.name] then + local embeds = self.embeds[addon] + for i = 1, #embeds do + local lib = LibStub:GetLibrary(embeds[i], true) + if lib then safecall(lib.OnEmbedDisable, lib, addon) end + end + -- disable possible modules. + for name, module in pairs(addon.modules) do + self:DisableAddon(module) + end + end + + return not self.statuses[addon.name] -- return true if we're disabled +end + +--- Get an iterator over all registered addons. +-- @usage +-- -- Print a list of all installed AceAddon's +-- for name, addon in AceAddon:IterateAddons() do +-- print("Addon: " .. name) +-- end +function AceAddon:IterateAddons() return pairs(self.addons) end + +--- Get an iterator over the internal status registry. +-- @usage +-- -- Print a list of all enabled addons +-- for name, status in AceAddon:IterateAddonStatus() do +-- if status then +-- print("EnabledAddon: " .. name) +-- end +-- end +function AceAddon:IterateAddonStatus() return pairs(self.statuses) end + +-- Following Iterators are deprecated, and their addon specific versions should be used +-- e.g. addon:IterateEmbeds() instead of :IterateEmbedsOnAddon(addon) +function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end +function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end + +-- Event Handling +local function onEvent(this, event, arg1) + if event == "ADDON_LOADED" or event == "PLAYER_LOGIN" then + -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration + while(#AceAddon.initializequeue > 0) do + local addon = tremove(AceAddon.initializequeue, 1) + -- this might be an issue with recursion - TODO: validate + if event == "ADDON_LOADED" then addon.baseName = arg1 end + AceAddon:InitializeAddon(addon) + tinsert(AceAddon.enablequeue, addon) + end + + if IsLoggedIn() then + while(#AceAddon.enablequeue > 0) do + local addon = tremove(AceAddon.enablequeue, 1) + AceAddon:EnableAddon(addon) + end + end + end +end + +AceAddon.frame:RegisterEvent("ADDON_LOADED") +AceAddon.frame:RegisterEvent("PLAYER_LOGIN") +AceAddon.frame:SetScript("OnEvent", onEvent) + +-- upgrade embeded +for name, addon in pairs(AceAddon.addons) do + Embed(addon) +end diff -r 000000000000 -r 823e33465b6e Libs/AceAddon-3.0/AceAddon-3.0.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Libs/AceAddon-3.0/AceAddon-3.0.xml Fri Sep 03 12:43:36 2010 +0200 @@ -0,0 +1,4 @@ + +