From 281e14d1fbfeb48871adb3d33c943e69bb170cb8 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 20 May 2019 16:36:17 +0100 Subject: Add the basics of usig BRB instead of QUIT for draft/resume-0.4 --- modules/resume.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/resume.py b/modules/resume.py index a2b6bf27..b1984d0f 100644 --- a/modules/resume.py +++ b/modules/resume.py @@ -73,3 +73,9 @@ class Module(ModuleManager.BaseModule): if not channel_name in resume_channels: resume_channels.append(channel_name) event["server"].set_setting("resume-channels", resume_channels) + + @utils.hook("preprocess.send.quit") + def preprocess_send(self, event): + if event["line"].command == "QUIT" and event["server"].has_capability( + CAP): + event["line"].command = "BRB" -- cgit v1.3.1-10-gc9f91