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", self.log.warn("FAIL (%s %s) received: %s",
[command, error_code, description]) [command, error_code, description])
self.events.on("received.fail").call(command=command, self.events.on("received.fail").on(command).call(error_code=error_code,
error_code=error_code, context=context, description=description) context=context, description=description, server=event["server"])
# first numeric line the server sends # first numeric line the server sends
@utils.hook("raw.received.001", default_event=True) @utils.hook("raw.received.001", default_event=True)