From 2e43c9f3cfc65f80875a8b06374ac16ac50b3211 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 8 Nov 2018 17:08:46 +0000 Subject: [PATCH] Add a way to halt CAP before it hits CAP END --- modules/line_handler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/line_handler.py b/modules/line_handler.py index 0033ea4f..bdb0c70b 100644 --- a/modules/line_handler.py +++ b/modules/line_handler.py @@ -292,12 +292,13 @@ class Module(ModuleManager.BaseModule): elif subcommand == "ack": event["server"].capabilities.update(capabilities) if not is_multiline: - self.events.on("received.cap.ack").call( + results = self.events.on("received.cap.ack").call( capabilities=event["server"].capabilities, server=event["server"]) - if not event["server"].waiting_for_capabilities(): - event["server"].send_capability_end() + if not False in results: + if not event["server"].waiting_for_capabilities(): + event["server"].send_capability_end() elif subcommand == "nack": event["server"].send_capability_end()