Quantcast

Added a small debug function for troubleshooting that can be activated using /clique debug.

James Whitehead II [02-06-07 - 03:42]
Added a small debug function for troubleshooting that can be activated using /clique debug.
Filename
Clique.lua
diff --git a/Clique.lua b/Clique.lua
index 6cfa9b9..13086e2 100644
--- a/Clique.lua
+++ b/Clique.lua
@@ -77,6 +77,10 @@ function Clique:Enable()
 	end

     hooksecurefunc("CreateFrame", raidFunc)
+
+	-- Create our slash command
+	self.cmd = self:InitializeSlashCommand("Clique commands", "CLIQUE", "clique")
+	self.cmd:RegisterSlashHandler("debug - Enables extra messages for debugging purposes", "debug", "ShowAttributes")
 end

 function Clique:EnableFrames()
@@ -485,4 +489,11 @@ end)
 -- 100 pause, default mult
 -- min: 16095
 -- max: 20052
--- cycle: 17857
\ No newline at end of file
+-- cycle: 17857
+
+function Clique:ShowAttributes()
+	self:Print("Enabled enhanced debugging.")
+	PlayerFrame:SetScript("OnAttributeChanged", function(...) self:Print(...) end)
+	self:UnregisterFrame(PlayerFrame)
+	self:RegisterFrame(PlayerFrame)
+end