From 2b539794624e4750588c814febbd3a250c1f80e6 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 3 Jul 2012 00:47:52 +0200 Subject: [PATCH] Return lusers information on connect. --- ircd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ircd.py b/ircd.py index ea060b8..e26a2b7 100755 --- a/ircd.py +++ b/ircd.py @@ -209,6 +209,10 @@ class user: self.client.send_numeric("002", ":Your host is %s, running %s." % (config_ownhost, config_version)) self.client.send_numeric("003", ":This server has been running since unknown.") self.client.send_numeric("004", ":%s %s %s %s" % (config_ownhost, config_version, "", "")) + self.client.send_numeric("251", ":There are %d users and 0 invisible on 1 server." % len(self.server.users)) + self.client.send_numeric("252", "%d :operator(s) online." % 0) + self.client.send_numeric("254", "%d :channel(s) formed." % 0) + self.client.send_numeric("255", ":I have %d clients and 1 server." % len(self.server.users)) # TODO: Sum all clients of all listenersm rather than taking the usercount. def end(self): del self.server.users[self.nickname]