From 814d8e051996bcabe5f22f6d36628c835a082ef1 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 13 Sep 2013 12:43:47 +0400 Subject: [PATCH] a little tweak to command errors --- ElvUI_SLE/dev/commands.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ElvUI_SLE/dev/commands.lua b/ElvUI_SLE/dev/commands.lua index 80d8100..232c942 100755 --- a/ElvUI_SLE/dev/commands.lua +++ b/ElvUI_SLE/dev/commands.lua @@ -7,17 +7,21 @@ local Message = '' function E:sleCommand(flag, channel, target, output, text, wtarget) if not SLE:CheckFlag(nil, 'SLEAUTHOR') then - SLE:Print('You need to be authorized to use this command.') + SLE:Print('|cffFF0000Access Denied|r: You need to be authorized to use this command.') return end if target == (nil or "")then - SLE:Print('You need to set a unit to execute command.') + SLE:Print('|cffFF0000Error|r: You need to set a unit to execute command.') + return + end + if text == (nil or "") then + SLE:Print('|cffFF0000Error|r: You need to actually send something in your message.') return end Message = target if flag == 'SLE_DEV_SAYS' then if output == 'WHISPER' and (wtarget == (nil or "")) then - SLE:Print('You need to set a whisper target.') + SLE:Print('|cffFF0000Error|r: You need to set a whisper target.') return end Message = Message.."#"..output.."#"..text @@ -28,7 +32,7 @@ function E:sleCommand(flag, channel, target, output, text, wtarget) Message = Message.."#"..text end SendAddonMessage(flag, Message, channel, target) - SLE:Print('Command executed.') + SLE:Print('|cff00FF00Success|r: Command executed.') end -- 1.7.9.5