summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorAlex Wright <alex@xeentech.com>2013-02-03 08:16:32 +0000
committerJoel Rosdahl <joel@rosdahl.net>2013-02-20 21:07:28 +0100
commite70b7dd01f82cd70faeec56895e029cf27dbad41 (patch)
tree32e8f53484b4ba66f4ad1ec97d7529f346a5cea7 /miniircd
parentf0cc73a3f3053845ad609f072461a524fea954b8 (diff)
downloadminiircd-e70b7dd01f82cd70faeec56895e029cf27dbad41.tar.gz
miniircd-e70b7dd01f82cd70faeec56895e029cf27dbad41.zip
Moving luser output to it's own method.
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd10
1 files changed, 6 insertions, 4 deletions
diff --git a/miniircd b/miniircd
index 5aaa629..9857216 100755
--- a/miniircd
+++ b/miniircd
@@ -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()