mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 12:49:24 +01:00
Services: Add support for REGISTER responses in nested batches.
This commit is contained in:
parent
6f6dad8f7b
commit
8b497af30b
@ -668,12 +668,22 @@ class Services(callbacks.Plugin):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
if "batch" in msg.server_tags:
|
label = msg.server_tags.get("label")
|
||||||
# TODO: handle recursive batches
|
|
||||||
batch = irc.state.batches[msg.server_tags["batch"]]
|
if not label and "batch" in msg.server_tags:
|
||||||
label = batch.messages[0].server_tags["label"]
|
for batch in irc.state.getParentBatches(msg):
|
||||||
else:
|
label = batch.messages[0].server_tags.get("label")
|
||||||
label = msg.server_tags["label"]
|
if label:
|
||||||
|
break
|
||||||
|
|
||||||
|
if not label:
|
||||||
|
self.log.error(
|
||||||
|
"Got '%s' on %s, but it is missing a label. "
|
||||||
|
"This is a bug, please report it.",
|
||||||
|
command, irc.network
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
if label not in self._register:
|
if label not in self._register:
|
||||||
self.log.warning(
|
self.log.warning(
|
||||||
"Got '%s' on %s, but I don't remember using "
|
"Got '%s' on %s, but I don't remember using "
|
||||||
|
Loading…
Reference in New Issue
Block a user