Quantcast

Repeat debug squash

Erik L. Vonderscheer [07-13-09 - 05:09]
Repeat debug squash
Filename
TradeFilter3.lua
diff --git a/TradeFilter3.lua b/TradeFilter3.lua
index ce9386b..0cff102 100644
--- a/TradeFilter3.lua
+++ b/TradeFilter3.lua
@@ -251,15 +251,18 @@ 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
-				--@alpha@
 				if (TF3.db.profile.debug) then
 					if (msg ~= last_msg) 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
 				return true
 			end
 	  elseif (msg ~= repeatdata[userID].lastmsg) then