Pass server through FAIL events, use FAIL command as part of event path

This commit is contained in:
jesopo 2019-05-22 11:56:21 +01:00
parent cf89e28019
commit 4ce8d6b461

View file

@ -55,8 +55,8 @@ class Module(ModuleManager.BaseModule):
self.log.warn("FAIL (%s %s) received: %s",
[command, error_code, description])
self.events.on("received.fail").call(command=command,
error_code=error_code, context=context, description=description)
self.events.on("received.fail").on(command).call(error_code=error_code,
context=context, description=description, server=event["server"])
# first numeric line the server sends
@utils.hook("raw.received.001", default_event=True)