From c4da1a24fc3904a11144d74181d8686383401ffe Mon Sep 17 00:00:00 2001 From: "Erik L. Vonderscheer" Date: Mon, 10 Jan 2011 21:43:25 -0800 Subject: [PATCH] Fix LDB counting of filtered messages when debug is off, also make sure that LDB is loaded before calling LDBUpdate() --- TradeFilter3.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/TradeFilter3.lua b/TradeFilter3.lua index 30bf21f..52451a6 100644 --- a/TradeFilter3.lua +++ b/TradeFilter3.lua @@ -401,7 +401,9 @@ function TF3:BlackList(msg, userID, msgID, coloredName) TF3:FindFrame(debugFrame, L["MATCHED"] .. " |cFFFF0000" .. word .. "|r") if not (TF3.db.profile.redirect_blacklist) then lastmsgID = msgID - TF3:LDBUpdate("ldbblack") + if (LDB) then + TF3:LDBUpdate("ldbblack") + end end end end @@ -759,11 +761,13 @@ function TF3:FilterFunc(chan, ...) if (lastmsg ~= msg or lastuserID ~= userID) then if (TF3.db.profile.debug) then TF3:FindFrame(debugFrame, L["NOMATCH"]) - TF3:LDBUpdate("ldbfilter") end if (TF3.db.profile.redirect) then TF3:FindFrame(redirectFrame, "|cFFC08080[" .. chan .. "]|r |cFFD9D9D9[" .. msgID .. "]|r |Hplayer:" .. userID .. ":" .. msgID .. "|h[" .. coloredName .. "]|h |cFFC08080: " .. msg .. "|r") end + if (LDB) then + TF3:LDBUpdate("ldbfilter") + end lastmsg, lastuserID = msg, userID end end -- 1.7.9.5