]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_lusers.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / cmd_lusers.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16
17 using namespace std;
18
19 #include "inspircd_config.h"
20 #include "inspircd.h"
21 #include "inspircd_io.h"
22 #include <string>
23 #include <vector>
24 #include "users.h"
25 #include "ctables.h"
26 #include "globals.h"
27 #include "message.h"
28 #include "commands.h"
29 #include "inspstring.h"
30 #include "helperfuncs.h"
31 #include "hashcomp.h"
32 #include "typedefs.h"
33 #include "command_parse.h"
34 #include "cmd_lusers.h"
35
36 void cmd_lusers::Handle (char **parameters, int pcnt, userrec *user)
37 {
38         // this lusers command shows one server at all times because
39         // a protocol module must override it to show those stats.
40         WriteServ(user->fd,"251 %s :There are %d users and %d invisible on 1 server",user->nick,usercnt()-usercount_invisible(),usercount_invisible());
41         WriteServ(user->fd,"252 %s %d :operator(s) online",user->nick,usercount_opers());
42         WriteServ(user->fd,"253 %s %d :unknown connections",user->nick,usercount_unknown());
43         WriteServ(user->fd,"254 %s %d :channels formed",user->nick,chancount());
44         WriteServ(user->fd,"254 %s :I have %d clients and 0 servers",user->nick,local_count());
45 }
46
47