CAP capabilities would not be index 2 if the line is multiline

(line_handler.py)
This commit is contained in:
jesopo 2019-02-05 16:48:12 +00:00
parent b742b1ecee
commit 8e59809db2

View file

@ -282,9 +282,9 @@ class Module(ModuleManager.BaseModule):
# the server is telling us about its capabilities! # the server is telling us about its capabilities!
@utils.hook("raw.received.cap") @utils.hook("raw.received.cap")
def cap(self, event): def cap(self, event):
capabilities = utils.parse.keyvalue(event["args"][2]) capabilities = utils.parse.keyvalue(event["args"][-1])
subcommand = event["args"][1].lower() subcommand = event["args"][1].lower()
is_multiline = len(event["args"]) > 2 and event["args"][2] == "*" is_multiline = len(event["args"]) > 3 and event["args"][2] == "*"
if subcommand == "ls": if subcommand == "ls":
event["server"].cap_started = True event["server"].cap_started = True