Version 0.9.0-rc1
- enable/disable from slash command - matching conditions (never, always, start, end, start or end) - support capturing groups - import examples - testing capabilities - compatibility with WoW Retail - adapted help texts - spelling errors
This commit is contained in:
@@ -48,9 +48,9 @@ function Grichelde:OnEnable()
|
||||
self:SetupSlashCommands()
|
||||
|
||||
-- tell the world we are listening
|
||||
if self.db.profile.enabled then
|
||||
if (self.db.profile.enabled == true) then
|
||||
local namePlusVersion = self:Format(self.L.AddonNamePlusVersion, self.L.AddonName, self.version)
|
||||
self:Print(self.L.AddonLoaded, self.COLOR_CODES.PREFIX .. namePlusVersion .. self.COLOR_CODES.CLOSE)
|
||||
self.F.print(self:Format(self.L.AddonLoaded, self.COLOR_CODES.PREFIX .. namePlusVersion .. self.COLOR_CODES.CLOSE))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -70,7 +70,7 @@ end
|
||||
|
||||
function Grichelde:HandleSlashCommand(input, ...)
|
||||
-- Show the GUI if no input is supplied, otherwise handle the chat input.
|
||||
if self.functions.nilOrEmpty(input) then
|
||||
if (self.F.nilOrEmpty(input)) then
|
||||
self:ToggleOptions()
|
||||
else
|
||||
-- handle slash ourselves
|
||||
@@ -81,6 +81,10 @@ function Grichelde:HandleSlashCommand(input, ...)
|
||||
self:ToggleOptions()
|
||||
elseif input == "profile" then
|
||||
self:PrintProfile()
|
||||
elseif input == "on" or input == "enable" then
|
||||
self:Activate()
|
||||
elseif input == "off" or input == "disable" then
|
||||
self:Deactivate()
|
||||
else
|
||||
self:SendChatMessageOverride(input, ...)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user