3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

ts6: 12 users max are allowed in each SJOIN message, not 10

This commit is contained in:
James Lu 2016-06-27 23:13:39 -07:00
parent 8b39635fa8
commit 12f1cce6a9

View File

@ -119,11 +119,11 @@ class TS6Protocol(TS6BaseProtocol):
log.debug('(%s) Filtered SJOIN modes to be regular modes: %s, banmodes: %s', self.irc.name, regularmodes, banmodes) log.debug('(%s) Filtered SJOIN modes to be regular modes: %s, banmodes: %s', self.irc.name, regularmodes, banmodes)
changedmodes = modes changedmodes = modes
while users[:10]: while users[:12]:
uids = [] uids = []
namelist = [] namelist = []
# We take <users> as a list of (prefixmodes, uid) pairs. # We take <users> as a list of (prefixmodes, uid) pairs.
for userpair in users[:10]: for userpair in users[:12]:
assert len(userpair) == 2, "Incorrect format of userpair: %r" % userpair assert len(userpair) == 2, "Incorrect format of userpair: %r" % userpair
prefixes, user = userpair prefixes, user = userpair
prefixchars = '' prefixchars = ''
@ -138,7 +138,7 @@ class TS6Protocol(TS6BaseProtocol):
self.irc.users[user].channels.add(channel) self.irc.users[user].channels.add(channel)
except KeyError: # Not initialized yet? except KeyError: # Not initialized yet?
log.debug("(%s) sjoin: KeyError trying to add %r to %r's channel list?", self.irc.name, channel, user) log.debug("(%s) sjoin: KeyError trying to add %r to %r's channel list?", self.irc.name, channel, user)
users = users[10:] users = users[12:]
namelist = ' '.join(namelist) namelist = ' '.join(namelist)
self._send(server, "SJOIN {ts} {channel} {modes} :{users}".format( self._send(server, "SJOIN {ts} {channel} {modes} :{users}".format(
ts=ts, users=namelist, channel=channel, ts=ts, users=namelist, channel=channel,