From e82a05dd378c304847a00d75440cdd54e536ae2e Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 22 May 2019 11:57:26 +0100 Subject: [PATCH] RESUME errors now come as `FAIL RESUME` --- modules/resume.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/resume.py b/modules/resume.py index d7e5935b..c3283bde 100644 --- a/modules/resume.py +++ b/modules/resume.py @@ -39,9 +39,6 @@ class Module(ModuleManager.BaseModule): self.log.info("Successfully resumed session", []) event["server"].cap_started = False - elif event["args"][0] == "ERR": - self.log.info("Failed to resume session: %s", [event["args"][1]]) - elif event["args"][0] == "TOKEN": token = self._get_token(event["server"]) self._set_token(event["server"], event["args"][1], new=True) @@ -79,3 +76,7 @@ class Module(ModuleManager.BaseModule): if event["line"].command == "QUIT" and event["server"].has_capability( CAP): event["line"].command = "BRB" + + @utils.hook("received.fail.resume") + def fail_resume(self, event): + event["server"].capability_done("resume")