diff options
| author | 2020-01-22 15:07:00 +0000 | |
|---|---|---|
| committer | 2020-01-22 15:07:00 +0000 | |
| commit | 363fdf01b093b441d1def37621a7b93a276cce35 (patch) | |
| tree | 41dd1dc5a9cac226bae7388d32bde1013a0a4431 | |
| parent | fix hostmask_match_many typehint (diff) | |
| signature | ||
support ISUPPORT MODES token having no arg
| -rw-r--r-- | modules/channel_op.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py index d18d18f9..d47e769c 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -325,7 +325,10 @@ class Module(ModuleManager.BaseModule): def _chunk_n(self, n, l): return [l[i:i+n] for i in range(0, len(l), n)] def _chunk(self, server, l): - return self._chunk_n(int(server.isupport.get("MODES", "3")), l) + # if `MODES` is not present - default to 3 + # if `MODES` is present without an arg, default to 6 + n = int(server.isupport.get("MODES", "3") or "6") + return self._chunk_n(n, l) @utils.hook("received.join") def on_join(self, event): |
