Fix LDB counting of filtered messages when debug is off, also make sure that LDB is loaded before calling LDBUpdate()
Erik L. Vonderscheer [01-11-11 - 05:43]
Fix LDB counting of filtered messages when debug is off, also make sure that LDB is loaded before calling LDBUpdate()
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