diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2016-09-20 22:47:40 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2016-09-20 22:47:40 +0200 |
commit | ce4441df89555865ac3b35903eec138d3824d414 (patch) | |
tree | b4dd825c827fe76b4c05de9b1fc189fa5b5c4245 /miniircd | |
parent | a765ed888eabf89be138335d6d9d13cee89d6f06 (diff) | |
download | miniircd-ce4441df89555865ac3b35903eec138d3824d414.tar.gz miniircd-ce4441df89555865ac3b35903eec138d3824d414.zip |
Clean up
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -270,19 +270,19 @@ class Client(object): self.reply("331 %s %s :No topic is set" % (self.nickname, channel.name)) names_prefix = "353 %s = %s :" % (self.nickname, channelname) - names = '' - # max length: reply prefix ":server_name(space)" - # plus CRLF in the end + names = "" + # 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): if not names: names = names_prefix + name - # using >= to include the space between "names" and "name" + # Using >= to include the space between "names" and "name". elif len(names) + len(name) >= names_max_len: self.reply(names) names = names_prefix + name else: - names += ' ' + name + names += " " + name if names: self.reply(names) self.reply("366 %s %s :End of NAMES list" |