From 7a58dc0aa027e538fa6b8758760c9faaf1477820 Mon Sep 17 00:00:00 2001 From: "Erik L. Vonderscheer" Date: Wed, 19 Sep 2012 20:59:13 -0700 Subject: [PATCH] Filter trade by default Fix various db key typos Fix version output in configuration panel --- TradeFilter3.lua | 19 ++++++++++--------- TradeFilter3Options.lua | 8 ++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/TradeFilter3.lua b/TradeFilter3.lua index e8579a7..905310f 100644 --- a/TradeFilter3.lua +++ b/TradeFilter3.lua @@ -63,7 +63,7 @@ local msgsFiltered = 0 local msgsBlackFiltered = 0 local MAJOR_VERSION = GetAddOnMetadata("TradeFilter3", "Version") -if (len(MAJOR_VERSION)<=6) then +if (len(MAJOR_VERSION)<=8) then TF3.version = sub(MAJOR_VERSION, 0, 8) else TF3.version = MAJOR_VERSION .. " DEV" @@ -84,10 +84,11 @@ defaults = { filterLFG = false, filterBG = false, filterGeneral = false, + filterDuelSpam = false, filterTrade = true, - editfilterTRADE_enable = false, - editfilterBASE_enable = false, - editfilterBG_enable = false, + addfilterTRADE_enable = false, + addfilterBASE_enable = false, + addfilterBG_enable = false, exmptfriendslist = true, exmptparty = true, ebl = false, @@ -122,12 +123,12 @@ function TF3:OnInitialize() -- Set up options panels. self.OptionsPanel = ACD:AddToBlizOptions(self.name, L["TFR"], nil, "generalGroup") self.OptionsPanel.about = LAP.new(self.name, self.name) - + if (TF3.db.profile.firstlogin) then TF3:FirstLogin() TF3.db.profile.firstlogin = false end - + if IsLoggedIn() then self:IsLoggedIn() else @@ -153,7 +154,7 @@ function TF3:IsLoggedIn() libfriends.RegisterCallback(self, "Removed") self:UnregisterEvent("PLAYER_LOGIN") TF3:DuelFilter() - + --[[ LibDataBroker object ]]-- if (LDB) then TF3Frame = CreateFrame("Frame", "LDB_TradeFilter3") @@ -348,7 +349,7 @@ function TF3:DuelFilter() else DUEL_WINNER_KNOCKOUT, DUEL_WINNER_RETREAT = L["DUEL_WINNER_KNOCKOUT"], L["DUEL_WINNER_RETREAT"] end -end +end --[[ BlackList Func ]]-- --[[ Base blacklist words from BadBoy(Funkydude) ]]-- @@ -628,7 +629,7 @@ local function PreFilterFunc(self, event, ...) end end --[[ Check for Special Channel and User setting ]]-- - elseif (TF3:SpecialChans(chanName)) then + elseif (TF3:SpecialChans(chanName)) then if (TF3.db.profile.special_enable) then if not (TF3:IsFriend(userID)) then if (userID == UnitName("Player") and not TF3.db.profile.filterSELF) then diff --git a/TradeFilter3Options.lua b/TradeFilter3Options.lua index 6685be2..368808b 100644 --- a/TradeFilter3Options.lua +++ b/TradeFilter3Options.lua @@ -76,8 +76,8 @@ function TF3:getOptions() disabled = false, name = L["TC"], desc = L["TCD"], - get = function() return TF3.db.profile.filtertrade end, - set = function() TF3.db.profile.filtertrade = not TF3.db.profile.filtertrade end, + get = function() return TF3.db.profile.filterTrade end, + set = function() TF3.db.profile.filterTrade = not TF3.db.profile.filterTrade end, }, generalChannel = { type = 'toggle', @@ -86,8 +86,8 @@ function TF3:getOptions() disabled = false, name = L["GC"], desc = L["GCD"], - get = function() return TF3.db.profile.filtergeneral end, - set = function() TF3.db.profile.filtergeneral = not TF3.db.profile.filtergeneral end, + get = function() return TF3.db.profile.filterGeneral end, + set = function() TF3.db.profile.filterGeneral = not TF3.db.profile.filterGeneral end, }, LFGChannel = { type = 'toggle', -- 1.7.9.5