From c99cbaf11889ebbd47fb9f7c616eba8b836c5467 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 28 Jul 2019 20:55:34 +0100 Subject: [PATCH] handle 'CAP DEL' for something that wasn't advertised --- modules/line_handler/ircv3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/line_handler/ircv3.py b/modules/line_handler/ircv3.py index 488af1dd..3d84c818 100644 --- a/modules/line_handler/ircv3.py +++ b/modules/line_handler/ircv3.py @@ -79,7 +79,8 @@ def cap(exports, events, event): if subcommand == "DEL": for capability in capabilities.keys(): event["server"].agreed_capabilities.discard(capability) - del event["server"].server_capabilities[capability] + if capability and event["server"].server_capabilities: + del event["server"].server_capabilities[capability] events.on("received.cap.del").call(server=event["server"], capabilities=capabilities)