/trunk
## SavedVariables: STS_SV |
## SavedVariablesPerCharacter: |
libs\LibStub\LibStub.lua |
libs\CallbackHandler-1.0\CallbackHandler-1.0.lua |
libs\LibDataBroker-1.1\LibDataBroker-1.1.lua |
StopTradeSpam.lua |
sts_notify = "" |
sts_quiet = 0 |
tignlist = "" |
-- DEBUG: LDB testing |
LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("StopTradeSpam", { |
type = "launcher", |
icon = "Interface\\Icons\\Spell_Nature_StormReach", |
OnClick = function(clickedframe, button) |
print(clickedframe, button) |
STS_Options() |
end, |
}) |
-- Events where author is ignored, but msg should not be filtered out (only notify) |
tign_notify = { |
["CHAT_MSG_BATTLEGROUND"] = STS_ChatFilter, |
end |
dcfa(GetAddOnMetadata("StopTradeSpam","Version")) |
elseif STScommand[1] == "options" or STScommand[1] == "o" then |
STS_Options() |
if IsAddOnLoaded("StopTradeSpam_Options") then |
InterfaceOptionsFrame_OpenToCategory("StopTradeSpam"); |
else |
LoadAddOn("StopTradeSpam_Options") |
InterfaceOptionsFrame_OpenToCategory("StopTradeSpam"); |
end |
elseif STScommand[1] == "debug" then |
if STScommand[2] then |
STS_SV["debug"] = true |
return sts_session_filtered,sts_session_all |
end |
function STS_Options(...) |
local opento = "StopTradeSpam" |
if select(1,...) then opento = opento.."_"..select(1,...) end |
if IsAddOnLoaded("StopTradeSpam_Options") then |
InterfaceOptionsFrame_OpenToCategory(opento); |
else |
LoadAddOn("StopTradeSpam_Options") |
InterfaceOptionsFrame_OpenToCategory(opento); |
end |
end |
function STS_Settings(...) |
--TODO: Interface for Options Frame |
local ret |