Add a way to silently stop commands executing in modules/commands.py

(preprocess.command)
This commit is contained in:
jesopo 2018-11-02 11:13:43 +00:00
parent 4fcb80b834
commit 24e4e2c5ad

View file

@ -141,7 +141,12 @@ class Module(ModuleManager.BaseModule):
hook=hook, user=event["user"], server=event["server"], hook=hook, user=event["user"], server=event["server"],
target=target, is_channel=is_channel, tags=event["tags"]) target=target, is_channel=is_channel, tags=event["tags"])
for returned in returns: for returned in returns:
if returned == False:
# denotes a "silent failure"
target.buffer.skip_next()
return
if returned: if returned:
# error message
stderr.write(returned).send() stderr.write(returned).send()
target.buffer.skip_next() target.buffer.skip_next()
return return