From 62d7c269b78a9dfe6fda8d8cd9f2a1401249da3c Mon Sep 17 00:00:00 2001 From: "Erik L. Vonderscheer" Date: Mon, 13 Jul 2009 06:04:24 +0000 Subject: [PATCH] Further cleaning --- TradeFilter3.lua | 33 +++++++++++++-------------------- TradeFilter3Options.lua | 2 ++ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/TradeFilter3.lua b/TradeFilter3.lua index 0cff102..d445db3 100644 --- a/TradeFilter3.lua +++ b/TradeFilter3.lua @@ -205,11 +205,9 @@ function TF3:BlackList(userID, msg) for _,word in pairs(blword) do if find(msg,word) then --@alpha@ - if (TF3.db.profile.debug) then - if (msg ~= last_msg) then - TF3:FindFrame(debugFrame, "|cFFFF0000[" .. L["bLists"] .. "]|r |cFFD9D9D9[" .. userID .. "]:|r |cFFC08080" .. msg .. "|r") - last_msg = msg - end + if (TF3.db.profile.debug and msg ~= last_msg) then + TF3:FindFrame(debugFrame, "|cFFFF0000[" .. L["bLists"] .. "]|r |cFFD9D9D9[" .. userID .. "]:|r |cFFC08080" .. msg .. "|r") + last_msg = msg end --@end-alpha@ return true @@ -226,11 +224,9 @@ function TF3:WhiteList(userID, msg) for _,word in pairs(wlword) do if find(msg,word) then --@alpha@ - if (TF3.db.profile.debug) then - if (msg ~= last_msg) then - TF3:FindFrame(debugFrame, "|cFFFFFF80[" .. L["wLists"] .. "]|r |cFFD9D9D9[" .. userID .. "]:|r |cFFC08080" .. msg .. "|r") - last_msg = msg - end + if (TF3.db.profile.debug and msg ~= last_msg) then + TF3:FindFrame(debugFrame, "|cFFFFFF80[" .. L["wLists"] .. "]|r |cFFD9D9D9[" .. userID .. "]:|r |cFFC08080" .. msg .. "|r") + last_msg = msg end --@end-alpha@ return true @@ -251,17 +247,14 @@ function TF3:FindRepeat(userID, msg) if (msg == repeatdata[userID].lastmsg and gtime - repeatdata[userID].lastIndex < tonumber(TF3.db.profile.time_repeats)) then repeatdata[userID].repeats = repeatdata[userID].repeats + 1 if (repeatdata[userID].repeats >= tonumber(TF3.db.profile.num_repeats)) then - if (TF3.db.profile.debug) then - if (msg ~= last_msg) then + if (msg ~= last_msg) then + --@alpha@ + if (TF3.db.profile.debug) then TF3:FindFrame(repeatFrame, "|cFFFF8C00[" .. L["#RPT"] .. "]|r |cFFD9D9D9[" .. userID .. "]:|r |cFFC08080" .. msg .. "|r") - TF3.db.profile.repeats_blocked = TF3.db.profile.repeats_blocked + 1 - last_msg = msg - end - else - if (msg ~= last_msg) then - TF3.db.profile.repeats_blocked = TF3.db.profile.repeats_blocked + 1 - last_msg = msg - end + end + --@end-alpha@ + TF3.db.profile.repeats_blocked = TF3.db.profile.repeats_blocked + 1 + last_msg = msg end return true end diff --git a/TradeFilter3Options.lua b/TradeFilter3Options.lua index 2b9ac91..e213713 100644 --- a/TradeFilter3Options.lua +++ b/TradeFilter3Options.lua @@ -390,6 +390,7 @@ options = { get = function(info) return TF3.db.profile.time_repeats end, set = function(info, value) TF3.db.profile.time_repeats = value end, }, + --@alpha@ repeats_blocked = { type = 'input', disabled = true, @@ -407,6 +408,7 @@ options = { desc = L["RPTRESETD"], func = function() TF3.db.profile.repeats_blocked = 0 end, }, + --@end-alpha@ }, }, outputGroup = { -- 1.7.9.5