server_capabilities
is a dict, capabilities
is a set (line_handler.py)
This commit is contained in:
parent
91f78e834e
commit
9a0b8f3d00
1 changed files with 7 additions and 4 deletions
|
@ -307,9 +307,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
else:
|
else:
|
||||||
event["server"].send_capability_end()
|
event["server"].send_capability_end()
|
||||||
elif subcommand == "new":
|
elif subcommand == "new":
|
||||||
event["server"].capabilities.update(set(capabilities.keys()))
|
capabilities_keys = capabilities.keys()
|
||||||
|
event["server"].server_capabilities.update(capabilities)
|
||||||
|
|
||||||
matched_caps = self._match_caps(list(capabilities.keys()))
|
matched_caps = self._match_caps(list(capabilities_keys))
|
||||||
event["server"].queue_capabilities(matched_caps)
|
event["server"].queue_capabilities(matched_caps)
|
||||||
|
|
||||||
self._event(event, "cap.new", server=event["server"],
|
self._event(event, "cap.new", server=event["server"],
|
||||||
|
@ -318,8 +319,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
if event["server"].has_capability_queue():
|
if event["server"].has_capability_queue():
|
||||||
event["server"].send_capability_queue()
|
event["server"].send_capability_queue()
|
||||||
elif subcommand == "del":
|
elif subcommand == "del":
|
||||||
event["server"].capabilities.difference_update(set(
|
for capability in capabilities.keys():
|
||||||
capabilities.keys()))
|
event["server"].capabilities.discard(capability)
|
||||||
|
del event["server"].server_capabilities[capability]
|
||||||
|
|
||||||
self._event(event, "cap.del", server=event["server"],
|
self._event(event, "cap.del", server=event["server"],
|
||||||
capabilities=capabilities)
|
capabilities=capabilities)
|
||||||
elif subcommand == "ack":
|
elif subcommand == "ack":
|
||||||
|
|
Loading…
Reference in a new issue