-- XPerl_SlashHandler
local function XPerl_SlashHandler(msg)
	local args = {}

	for value in string.gmatch(msg, "[^ ]+") do
		tinsert(args, string.lower(value))
	end
	if (args[1]=="") then
		XPerl_OptionsMenu_Frame:Show()
		return
	end

	if (args[1] == nil or args[1] == "menu" or args[1] == "options") then
		XPerl_UnlockFrames()

	elseif (args[1]=="lock") then
		XPerlLocked = 1
		if (XPerl_RaidTitles) then
			XPerl_RaidTitles()
		end

	elseif (args[1]=="unlock") then
		XPerlLocked = 0
	else
		DEFAULT_CHAT_FRAME:AddMessage("|c00009000Usage: |c00FF0000/xperl menu | lock | unlock|r")
	end
end

-- XPerl_SlashOnLoad
function XPerl_SlashOnLoad()
        SlashCmdList["XPERL"] = XPerl_SlashHandler
        SLASH_XPERL1 = "/xperl"
	XPerl_SlashOnLoad = nil
end
