From 2e7c69d5023db7bf2fa5ad142c0bec58bb6f32dd Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 3 Jul 2012 01:26:27 +0200 Subject: [PATCH] Move lusers output to its own function --- ircd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ircd.py b/ircd.py index ebf4d85..0102900 100755 --- a/ircd.py +++ b/ircd.py @@ -209,11 +209,13 @@ 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, "", "")) + + def send_lusers(self): 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]