From 2d7a192a6ceb3fb089038bcf6e39c2a07eca8928 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 12 Sep 2019 15:13:42 +0100 Subject: [PATCH] limit !flags mode changes to 3-per-line, add comment as to why --- modules/channel_op.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/channel_op.py b/modules/channel_op.py index d8a987f1..4cef0f99 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -309,7 +309,9 @@ class Module(ModuleManager.BaseModule): modes.append(("b", self._get_hostmask(channel, user))) 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)) channel.send_mode("+%s" % "".join(chars), list(args)) if not kick_reason == None: