changeset 5:c8e6f44df417

no longer using slash commands
author ovolkov
date Wed, 21 Jan 2015 19:40:38 +0300
parents d88ea0fdc19c
children 5a89e06534ac
files Slash.lua
diffstat 1 files changed, 0 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/Slash.lua	Wed Jan 21 19:19:13 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-local aName, aEnv = ...
-
-local strchar = string.char
-local strbyte = string.byte
-local random = random
-local strsub = strsub
-local tonumber = tonumber
-
-local function UniqSlashID(base, maxNumber)
-	local clear = true
-	for idx = 1, maxNumber do
-		if _G["SLASH_" .. base .. idx] then clear = false break end
-	end
-	if SlashCmdList[base] then clear = false end
-	if clear then return base end
-	return UniqSlashID(base .. (strchar(random(strbyte('a'), strbyte('z')))), maxNumber)
-end
-
-local slashID
-
-slashID=UniqSlashID("LFGActivityFilter", 1)
-_G["SLASH_" .. slashID .. "1"] = "/lfgaf"
-SlashCmdList[slashID] = function(activities)
-	wipe(aEnv.LFGFilter_Allow_Activity)
-	local count = 0
-	for activity in string.gmatch(activities, "[^ ]+") do
-		local activity_id = tonumber(activity)
-		local activity_name
-		if activity_id then activity_name = C_LFGList.GetActivityInfo(activity_id) end
-		if activity_name then
-			print("Adding wanted activity to filter: ", activity_name)
-			aEnv.LFGFilter_Allow_Activity[activity_id] = true
-			count = count + 1
-		else
-			print("Can't parse activity ID or it doesn't match known activity: ", activity_id)
-		end
-	end
-        aEnv.LFGFilter_Allow_Activity.count = count
-	if count > 0 then
-		print("Activities in filter: ", count)
-	else
-		print("Filters removed.")
-	end
-end
-
-slashID=UniqSlashID("LFGActivityList", 1)
-_G["SLASH_" .. slashID .. "1"] = "/lfgal"
-SlashCmdList[slashID] = function()
-	for activity_id = 1, 10000 do
-		local activity_name = C_LFGList.GetActivityInfo(activity_id)
-		if activity_name then
-			print(activity_id, activity_name)
-		end
-	end
-end
\ No newline at end of file