Quantcast

Fix various db key typos

Erik L. Vonderscheer [09-20-12 - 03:59]
Fix various db key typos
Filename
TradeFilter3.lua
TradeFilter3Options.lua
diff --git a/TradeFilter3.lua b/TradeFilter3.lua
index e8579a7..f9820d0 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,
-		filterTrade = true,
-		editfilterTRADE_enable = false,
-		editfilterBASE_enable = false,
-		editfilterBG_enable = false,
+		filterDuelSpam = false,
+		filterTrade = 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) ]]--
@@ -582,7 +583,7 @@ local function PreFilterFunc(self, event, ...)
 	local whitelisted = TF3:WhiteList(msg, userID, msgID, coloredName)
 	--[[ Check for Trade Channel and User setting ]]--
 	if (zoneID == 2) then
-		if (TF3.db.profile.filtertrade) then
+		if (TF3.db.profile.filterTrade) then
 			if not (TF3:IsFriend(userID)) then
 				if (userID == UnitName("Player") and not TF3.db.profile.filterSELF) then
 					filtered = false
@@ -597,7 +598,7 @@ local function PreFilterFunc(self, event, ...)
 		end
 --[[ Check for General Channel and User setting ]]--
 	elseif (chanID == 1) then
-		if (TF3.db.profile.filtergeneral) then
+		if (TF3.db.profile.filterGeneral) then
 			if not (TF3:IsFriend(userID)) then
 				if (userID == UnitName("Player") and not TF3.db.profile.filterSELF) then
 					filtered = false
@@ -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',