Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

returning shrubbot clientcommand

lua

  • Please log in to reply
No replies to this topic

#1
OFFLINE   Zelly

Zelly

    Regular Member

  • Coders
  • PipPipPip
  • 141 posts
73
Getting Better
 
I am having some issues blocking some shrubbot commands, sometimes...
I don't understand why its happening
 
Here is where I am at, shouldn't need to understand what all this does just the return part:
function et_ClientCommand( clientNum , cmd )
...
    if CommandHandler:Command(Client,"chat",CommandName:gsub(Config.Prefix.Chat,"",1),Args) == 1 then -- Check return output of command
        Console:Debug("et_ClientCommand chat command return 1" ,"command") -- I get this message
        return 1 -- should stop command here?
    else -- doesn't get here.
        local CommandName,Args = CommandHandler:getArgs(et.ConcatArgs(0),0)
        return CommandHandler:ChatFilter(Client,CommandName,table.concat(Args," "))
    end
...
end
 
I do !warn or !warn zel
it does my command like expected , but it does warn shrubbot command BEFORE my command.
I get my debug message fine which to mean the clientcommand should be returning 1, meaning it shouldn't run the warn command.
 
I do a similar styled command !list all and it does not run the shrubbot command like expected.
 
It has got to be something I am doing wrong, since I did a quick test lua and return 1 for just warn command there and it blocked the command.
 
Possible I am just overlooking something really simple, will update if I find it. In meantime help would be appreciated.
Image of output: 
313e4f4ee8f659ec4d3b6ec2bdcbf68f.png






Also tagged with one or more of these keywords: lua

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users