Add a way to halt CAP before it hits CAP END

This commit is contained in:
jesopo 2018-11-08 17:08:46 +00:00
parent 88cb327d02
commit 2e43c9f3cf

View file

@ -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()