RESUME errors now come as FAIL RESUME

This commit is contained in:
jesopo 2019-05-22 11:57:26 +01:00
parent 4ce8d6b461
commit e82a05dd37

View file

@ -39,9 +39,6 @@ class Module(ModuleManager.BaseModule):
self.log.info("Successfully resumed session", []) self.log.info("Successfully resumed session", [])
event["server"].cap_started = False 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": elif event["args"][0] == "TOKEN":
token = self._get_token(event["server"]) token = self._get_token(event["server"])
self._set_token(event["server"], event["args"][1], new=True) 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( if event["line"].command == "QUIT" and event["server"].has_capability(
CAP): CAP):
event["line"].command = "BRB" event["line"].command = "BRB"
@utils.hook("received.fail.resume")
def fail_resume(self, event):
event["server"].capability_done("resume")