Mercurial > wow > devian
diff Devian.lua @ 87:e80723841888
- /dvn rc resets the current workspace channels and tags
- slash command arguments handled by string.find
- toggle command argument handling
author | Nenue |
---|---|
date | Tue, 26 Jul 2016 09:21:37 -0400 |
parents | 6e27274da4d9 |
children | b3ed963f482d |
line wrap: on
line diff
--- a/Devian.lua Tue Jul 26 01:45:30 2016 -0400 +++ b/Devian.lua Tue Jul 26 09:21:37 2016 -0400 @@ -594,13 +594,6 @@ db.tagcolor = {} D:Print('Tag color cache cleared.') end -D.ConfigCommand = function(self, input) - if not self.config then - self.config = DevCon - self:EnableModule("Config") - end - self.modules.Config:ChatCommand(input) -end function D:OnEnable() @@ -609,15 +602,20 @@ ['dfs'] = 'FrameHelper_Update', ['dvn'] = "Command", ['devian'] = "Command", - ['dvc'] = "Console_Toggle", + ['dvc'] = function() D:Console_Toggle() end, ['dvncolors'] = "UnsetColors", ['cleandvn'] = "SetDefaultsAll", ['resetdvn'] = "SetDefaults", - ['dvg'] = "ConfigCommand" } for cmd, func in pairs(cmdlist) do - _G['SLASH_' .. cmd:upper() .. '1'] = "/"..cmd - SlashCmdList[cmd:upper()] = D[func] + local CMD = cmd:upper() + _G['SLASH_' .. CMD:upper() .. '1'] = "/"..cmd + if type(func == 'string') then + SlashCmdList[CMD] = D[func] + else + SlashCmdList[CMD] = func + end + end end