Quantcast

Added slash commands and basic frame

U-punta-PC\punta [09-15-09 - 01:12]
Added slash commands and basic frame
Filename
WeightsWatcher.lua
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index 0d8c4c7..b01f6ba 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -3,7 +3,20 @@ if not WeightsWatcher then
 end

 function WeightsWatcher:OnInitialize()
+	SLASH_WEIGHTSWATCHER1="/ww"
+	SLASH_WEIGHTSWATCHER2="/weightswatcher"
+	SlashCmdList["WEIGHTSWATCHER"] =
+		function(msg)
+			commandHandler(msg)
+		end
+end
+
+function commandHandler(msg)
+	open_config()
+end

+function open_config()
+	WeightsWatcherConfig:Show()
 end

 function WeightsWatcher:OnEnable()