handle 'CAP DEL' for something that wasn't advertised

This commit is contained in:
jesopo 2019-07-28 20:55:34 +01:00
parent a0efd7c0c7
commit c99cbaf118

View file

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