mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-17 14:01:03 +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.
|
# Now, burst bans.
|
||||||
# <- :42X BMASK 1424222769 #dev b :*!test@*.isp.net *!badident@*
|
# <- :42X BMASK 1424222769 #dev b :*!test@*.isp.net *!badident@*
|
||||||
for bmode, bans in banmodes.items():
|
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:
|
if bans:
|
||||||
log.debug('(%s) sjoin: bursting mode %s with bans %s', self.irc.name, bmode, bans)
|
log.debug('(%s) sjoin: bursting mode %s with bans %s, ts:%s', self.irc.name, bmode, bans, ts)
|
||||||
self._send(server, "BMASK {ts} {channel} {bmode} :{bans}".format(ts=ts,
|
bans = list(bans) # Convert into list for splicing
|
||||||
channel=channel, bmode=bmode, bans=' '.join(bans)))
|
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)
|
self.updateTS(channel, ts, changedmodes)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user