Add a way to silently stop commands executing in modules/commands.py
(preprocess.command)
This commit is contained in:
parent
4fcb80b834
commit
24e4e2c5ad
1 changed files with 5 additions and 0 deletions
|
@ -141,7 +141,12 @@ class Module(ModuleManager.BaseModule):
|
|||
hook=hook, user=event["user"], server=event["server"],
|
||||
target=target, is_channel=is_channel, tags=event["tags"])
|
||||
for returned in returns:
|
||||
if returned == False:
|
||||
# denotes a "silent failure"
|
||||
target.buffer.skip_next()
|
||||
return
|
||||
if returned:
|
||||
# error message
|
||||
stderr.write(returned).send()
|
||||
target.buffer.skip_next()
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue