mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
ts6: cut off BMASK at 12 args per line to prevent message cutoff
Ref #253.
This commit is contained in:
parent
12f1cce6a9
commit
982e7c43f2
@ -148,10 +148,15 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
# Now, burst bans.
|
||||
# <- :42X BMASK 1424222769 #dev b :*!test@*.isp.net *!badident@*
|
||||
for bmode, bans in banmodes.items():
|
||||
# Max 15-3 = 12 bans per line to prevent cut off. (TS6 allows a max of 15 parameters per
|
||||
# line)
|
||||
if bans:
|
||||
log.debug('(%s) sjoin: bursting mode %s with bans %s', self.irc.name, bmode, bans)
|
||||
self._send(server, "BMASK {ts} {channel} {bmode} :{bans}".format(ts=ts,
|
||||
channel=channel, bmode=bmode, bans=' '.join(bans)))
|
||||
log.debug('(%s) sjoin: bursting mode %s with bans %s, ts:%s', self.irc.name, bmode, bans, ts)
|
||||
bans = list(bans) # Convert into list for splicing
|
||||
while bans[:12]:
|
||||
self._send(server, "BMASK {ts} {channel} {bmode} :{bans}".format(ts=ts,
|
||||
channel=channel, bmode=bmode, bans=' '.join(bans[:12])))
|
||||
bans = bans[12:]
|
||||
|
||||
self.updateTS(channel, ts, changedmodes)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user