limit !flags mode changes to 3-per-line, add comment as to why

This commit is contained in:
jesopo 2019-09-12 15:13:42 +01:00
parent 8ac0fce53f
commit 2d7a192a6c

View file

@ -309,7 +309,9 @@ class Module(ModuleManager.BaseModule):
modes.append(("b", self._get_hostmask(channel, user))) modes.append(("b", self._get_hostmask(channel, user)))
kick_reason = "User is banned from this channel" kick_reason = "User is banned from this channel"
for chunk in self._chunk(modes, 4): # break up in to chunks of (maximum) 3
# https://tools.ietf.org/html/rfc2812.html#section-3.2.3
for chunk in self._chunk(modes, 3):
chars, args = list(zip(*chunk)) chars, args = list(zip(*chunk))
channel.send_mode("+%s" % "".join(chars), list(args)) channel.send_mode("+%s" % "".join(chars), list(args))
if not kick_reason == None: if not kick_reason == None: