aboutsummaryrefslogtreecommitdiff
path: root/http2irc.py
diff options
context:
space:
mode:
authorGravatar steering72532026-06-12 19:16:58 -0600
committerGravatar steering72532026-06-12 19:16:58 -0600
commit81c5a3121995b68d0ed164bbdc1f5fc5cdae4fea (patch)
treec9fb092c3f9aba71634c2cab7020c9eadbb5ca56 /http2irc.py
parentsupport ISUPPORT LINELEN (diff)
fix error when receiving an ACCOUNT message after sending JOINs but before receiving the JOIN back HEAD master
(i.e. when the bot is connecting without SASL but gets identified by the server)
Diffstat (limited to 'http2irc.py')
-rw-r--r--http2irc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/http2irc.py b/http2irc.py
index 15f21a3..1061c22 100644
--- a/http2irc.py
+++ b/http2irc.py
@@ -781,7 +781,7 @@ class IRCClientProtocol(asyncio.Protocol):
'nick': line.hostmask.nickname,
'hostmask': str(line.hostmask),
'account': getattr(self.server.users.get(self.server.casefold(line.hostmask.nickname)), 'account', None),
- **({'modes': get_modes(channel)} if withModes else {}),
+ **({'modes': get_modes(channel)} if withModes and self.server.casefold(channel) in self.server.channels else {}),
}
if line.command == 'JOIN':
# Although servers SHOULD NOT send multiple channels in one message per the modern IRC docs <https://modern.ircdocs.horse/#join-message>, let's do the safe thing...