diff options
author | Alex Wright <alex@xeentech.com> | 2013-02-03 08:16:32 +0000 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2013-02-20 21:07:28 +0100 |
commit | e70b7dd01f82cd70faeec56895e029cf27dbad41 (patch) | |
tree | 32e8f53484b4ba66f4ad1ec97d7529f346a5cea7 | |
parent | f0cc73a3f3053845ad609f072461a524fea954b8 (diff) | |
download | miniircd-e70b7dd01f82cd70faeec56895e029cf27dbad41.tar.gz miniircd-e70b7dd01f82cd70faeec56895e029cf27dbad41.zip |
Moving luser output to it's own method.
-rwxr-xr-x | miniircd | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -212,8 +212,7 @@ class Client(object): % self.nickname) self.reply("004 %s :%s miniircd-%s o o" % (self.nickname, server.name, VERSION)) - self.reply("251 %s :There are %d users and 0 services on 1 server" - % (self.nickname, len(server.clients))) + self.send_lusers() self.send_motd() self.__handle_command = self.__command_handler @@ -230,8 +229,7 @@ class Client(object): self.reply("303 %s :%s" % (self.nickname, " ".join(online))) def lusers_handler(): - self.reply("251 %s :There are %d users and 0 services on 1 server" - % (self.nickname, len(server.clients))) + self.send_lusers() def join_handler(): if len(arguments) < 1: @@ -615,6 +613,10 @@ class Client(object): for client in clients: client.message(msg) + def send_lusers(self): + self.reply("251 %s :There are %d users and 0 services on 1 server" + % (self.nickname, len(self.server.clients))) + def send_motd(self): server = self.server motdlines = server.get_motd_lines() |