irclib: Fix assertion failure on InspIRCd when Sigyn plugin is loaded

This commit is contained in:
Valentin Lorentz 2022-04-08 12:44:42 +02:00
parent eb6fc932d9
commit 9ec4eb9563

View File

@ -1809,9 +1809,13 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
`msg` is the message that triggered this call."""
self.state.fsm.expect_state([
# Normal CAP ACK / CAP NAK during cap negotiation
# Normal CAP ACK / CAP NAK during cap negotiation:
IrcStateFsm.States.INIT_CAP_NEGOTIATION,
# CAP ACK / CAP NAK after a CAP NEW (probably)
# Sigyn sends CAP REQ when it sees RPL_SASLSUCCESS, so we get the
# CAP ACK while waiting for MOTD on some IRCds (eg. InspIRCd):
IrcStateFsm.States.INIT_WAITING_MOTD,
IrcStateFsm.States.INIT_MOTD,
# CAP ACK / CAP NAK after a CAP NEW (probably):
IrcStateFsm.States.CONNECTED,
])