summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xminiircd10
1 files changed, 5 insertions, 5 deletions
diff --git a/miniircd b/miniircd
index 8db1412..3048e7a 100755
--- a/miniircd
+++ b/miniircd
@@ -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"