Quantcast

disable chat cmds for all channels except party chat, atleast untill i write some filtering for idiots.

Jesse Manelius [03-10-18 - 11:23]
disable chat cmds for all channels except party chat, atleast untill i write some filtering for idiots.
Filename
iKeystones.lua
iKeystones.toc
diff --git a/iKeystones.lua b/iKeystones.lua
index a613bb7..bc590ef 100644
--- a/iKeystones.lua
+++ b/iKeystones.lua
@@ -9,15 +9,15 @@ addon:RegisterEvent('BAG_UPDATE')
 addon:RegisterEvent('CHALLENGE_MODE_KEYSTONE_RECEPTABLE_OPEN')

 --Chat events
-addon:RegisterEvent('CHAT_MSG_INSTANCE')
-addon:RegisterEvent('CHAT_MSG_INSTANCE_LEADER')
+--addon:RegisterEvent('CHAT_MSG_INSTANCE')
+--addon:RegisterEvent('CHAT_MSG_INSTANCE_LEADER')
 addon:RegisterEvent('CHAT_MSG_PARTY')
 addon:RegisterEvent('CHAT_MSG_PARTY_LEADER')
-addon:RegisterEvent('CHAT_MSG_RAID')
-addon:RegisterEvent('CHAT_MSG_RAID_LEADER')
-addon:RegisterEvent('CHAT_MSG_GUILD')
-addon:RegisterEvent('CHAT_MSG_GUILD_LEADER')
-addon:RegisterEvent('CHAT_MSG_OFFICER')
+--addon:RegisterEvent('CHAT_MSG_RAID')
+--addon:RegisterEvent('CHAT_MSG_RAID_LEADER')
+--addon:RegisterEvent('CHAT_MSG_GUILD')
+--addon:RegisterEvent('CHAT_MSG_GUILD_LEADER')
+--addon:RegisterEvent('CHAT_MSG_OFFICER')


 local iKS = {}
@@ -403,8 +403,12 @@ function iKS:PasteKeysToChat(all,channel, exactLevel, minLevel, maxLevel)
 			if i > 0 then
 				SendChatMessage(str, channel)
 			end
-		elseif level then
-			SendChatMessage("No keystones at or above " .. level..".", channel)
+		elseif exactLevel then
+			SendChatMessage("No keystones at " .. exactLevel..".", channel)
+		elseif minLevel and not maxLevel then
+			SendChatMessage("No keystones at or above " .. minLevel..".", channel)
+		elseif minLevel and maxLevel then
+			SendChatMessage("No keystones between "..minLevel.." and "..maxLevel..".", channel)
 		else
 			SendChatMessage("No keystones.", channel)
 		end
diff --git a/iKeystones.toc b/iKeystones.toc
index f543936..7bfc70b 100644
--- a/iKeystones.toc
+++ b/iKeystones.toc
@@ -2,7 +2,7 @@
 ## Title: iKeystones
 ## Notes: Tracks your keystones
 ## Author: Ironi
-## Version: 1.563
+## Version: 1.564
 ## DefaultState: enabled

 ## SavedVariables: iKeystonesDB, iKeystonesConfig