-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommands.lua
More file actions
42 lines (39 loc) · 1.53 KB
/
Copy pathCommands.lua
File metadata and controls
42 lines (39 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
local _, SNEK = ...
local function Dispatch(msg)
msg = strtrim(string.lower(msg or ""))
if msg == "" or msg == "options" or msg == "config" then
SNEK.Options.Open()
elseif msg == "minimap" then
local db = SNEK.DB.Get()
db.showMinimap = not db.showMinimap
SNEK.Minimap.UpdateVisibility()
print("|cff00ff00S.N.E.K.:|r Minimap icon " .. (db.showMinimap and "shown" or "hidden") .. ".")
elseif msg == "on" then
local db = SNEK.DB.Get()
db.enabled = true
SNEK_Reset()
print("|cff00ff00S.N.E.K.:|r Enabled.")
elseif msg == "off" then
local db = SNEK.DB.Get()
db.enabled = false
SNEK_Reset()
print("|cffff9900S.N.E.K.:|r Disabled.")
elseif msg == "reset" then
SNEK_Reset()
elseif msg == "version" then
print("|cff00ff00S.N.E.K.|r version " .. SNEK.VERSION)
elseif msg == "help" then
print("|cff00ff00S.N.E.K. commands:|r")
print(" /snek options - open options panel")
print(" /snek minimap - toggle minimap icon")
print(" /snek on - enable the addon")
print(" /snek off - disable the addon")
print(" /snek reset - clear current sequence")
print(" /snek version - show version")
print(" /snek help - show this help")
else
print("|cff00ff00S.N.E.K.:|r Unknown command. Type |cffffff00/snek help|r")
end
end
SLASH_SNEK1 = "/snek"
SlashCmdList["SNEK"] = Dispatch