comparison 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
comparison
equal deleted inserted replaced
86:6e27274da4d9 87:e80723841888
592 592
593 D.UnsetColors = function() 593 D.UnsetColors = function()
594 db.tagcolor = {} 594 db.tagcolor = {}
595 D:Print('Tag color cache cleared.') 595 D:Print('Tag color cache cleared.')
596 end 596 end
597 D.ConfigCommand = function(self, input)
598 if not self.config then
599 self.config = DevCon
600 self:EnableModule("Config")
601 end
602 self.modules.Config:ChatCommand(input)
603 end
604 597
605 function D:OnEnable() 598 function D:OnEnable()
606 599
607 -- commands 600 -- commands
608 local cmdlist = { 601 local cmdlist = {
609 ['dfs'] = 'FrameHelper_Update', 602 ['dfs'] = 'FrameHelper_Update',
610 ['dvn'] = "Command", 603 ['dvn'] = "Command",
611 ['devian'] = "Command", 604 ['devian'] = "Command",
612 ['dvc'] = "Console_Toggle", 605 ['dvc'] = function() D:Console_Toggle() end,
613 ['dvncolors'] = "UnsetColors", 606 ['dvncolors'] = "UnsetColors",
614 ['cleandvn'] = "SetDefaultsAll", 607 ['cleandvn'] = "SetDefaultsAll",
615 ['resetdvn'] = "SetDefaults", 608 ['resetdvn'] = "SetDefaults",
616 ['dvg'] = "ConfigCommand"
617 } 609 }
618 for cmd, func in pairs(cmdlist) do 610 for cmd, func in pairs(cmdlist) do
619 _G['SLASH_' .. cmd:upper() .. '1'] = "/"..cmd 611 local CMD = cmd:upper()
620 SlashCmdList[cmd:upper()] = D[func] 612 _G['SLASH_' .. CMD:upper() .. '1'] = "/"..cmd
613 if type(func == 'string') then
614 SlashCmdList[CMD] = D[func]
615 else
616 SlashCmdList[CMD] = func
617 end
618
621 end 619 end
622 end 620 end
623 621
624 function D:OnInitialize() 622 function D:OnInitialize()
625 L = D.L 623 L = D.L