diff options
author | Filipe Pina <fopina@gmail.com> | 2016-09-16 13:27:39 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2016-09-20 22:45:26 +0200 |
commit | 505cdd6ba74eb609d80d1ac00332bec9f5495f91 (patch) | |
tree | 47f32d529a1866ea6fee1b7bdc8b5cba3b6266cb /miniircd | |
parent | f301f19efdb6f3157e51d09a1cbfe8047059aac8 (diff) | |
download | miniircd-505cdd6ba74eb609d80d1ac00332bec9f5495f91.tar.gz miniircd-505cdd6ba74eb609d80d1ac00332bec9f5495f91.zip |
server_name was not being considered for 512 max length
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -271,9 +271,11 @@ class Client(object): % (self.nickname, channel.name)) names_prefix = "353 %s = %s :" % (self.nickname, channelname) names = names_prefix + # max length: reply prefix ":server_name(space)" plus CRLF in the end + names_max_len = 512 - (len(self.server.name) + 2 + 2) for name in sorted(x.nickname for x in channel.members): - # 510 + space + CRLF = 512 as per RFC - if len(names) + len(name) > 509: + # using >= to include the space between "names" and "name" + if len(names) + len(name) >= names_max_len: self.reply(names) names = names_prefix + name else: |