]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_lusers.cpp
Change includes, use --libs_r rather than mysql_config --libs, we want re-enterant...
[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 #include "users.h"
18 #include "commands.h"
19 #include "helperfuncs.h"
20 #include "commands/cmd_lusers.h"
21
22 void cmd_lusers::Handle (const char** parameters, int pcnt, userrec *user)
23 {
24         // this lusers command shows one server at all times because
25         // a protocol module must override it to show those stats.
26         WriteServ(user->fd,"251 %s :There are %d users and %d invisible on 1 server",user->nick,usercnt()-usercount_invisible(),usercount_invisible());
27         WriteServ(user->fd,"252 %s %d :operator(s) online",user->nick,usercount_opers());
28         WriteServ(user->fd,"253 %s %d :unknown connections",user->nick,usercount_unknown());
29         WriteServ(user->fd,"254 %s %d :channels formed",user->nick,chancount());
30         WriteServ(user->fd,"254 %s :I have %d clients and 0 servers",user->nick,local_count());
31 }