summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-09-20 22:47:40 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-09-20 22:47:40 +0200
commitce4441df89555865ac3b35903eec138d3824d414 (patch)
treeb4dd825c827fe76b4c05de9b1fc189fa5b5c4245 /miniircd
parenta765ed888eabf89be138335d6d9d13cee89d6f06 (diff)
downloadminiircd-ce4441df89555865ac3b35903eec138d3824d414.tar.gz
miniircd-ce4441df89555865ac3b35903eec138d3824d414.zip
Clean up
Diffstat (limited to 'miniircd')
-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"