summaryrefslogtreecommitdiff
path: root/src/cmd_lusers.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 17:52:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 17:52:10 +0000
commit2591562ada4cb1f866e5d1c98340fb19332b3844 (patch)
tree1cf18676c1851c39322d20fa208c0221e23ba6ac /src/cmd_lusers.cpp
parent1cbf29e3cd070c12437a657b47fc433008b2c74d (diff)
Move tons more stuff into class InspIRCd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4819 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_lusers.cpp')
-rw-r--r--src/cmd_lusers.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/cmd_lusers.cpp b/src/cmd_lusers.cpp
index 9c35bf35a..acb43c7ce 100644
--- a/src/cmd_lusers.cpp
+++ b/src/cmd_lusers.cpp
@@ -17,19 +17,23 @@
#include "users.h"
#include "commands.h"
#include "helperfuncs.h"
+#include "inspircd.h"
#include "commands/cmd_lusers.h"
+extern InspIRCd* ServerInstance;
+
void cmd_lusers::Handle (const char** parameters, int pcnt, userrec *user)
{
// this lusers command shows one server at all times because
// a protocol module must override it to show those stats.
- user->WriteServ("251 %s :There are %d users and %d invisible on 1 server",user->nick,usercnt()-usercount_invisible(),usercount_invisible());
- if (usercount_opers())
- user->WriteServ("252 %s %d :operator(s) online",user->nick,usercount_opers());
- if (usercount_unknown())
- user->WriteServ("253 %s %d :unknown connections",user->nick,usercount_unknown());
- if (chancount())
- user->WriteServ("254 %s %d :channels formed",user->nick,chancount());
- if (local_count())
- user->WriteServ("254 %s :I have %d clients and 0 servers",user->nick,local_count());
+ user->WriteServ("251 %s :There are %d users and %d invisible on 1 server",user->nick,ServerInstance->usercnt()-ServerInstance->usercount_invisible(),ServerInstance->usercount_invisible());
+ if (ServerInstance->usercount_opers())
+ user->WriteServ("252 %s %d :operator(s) online",user->nick,ServerInstance->usercount_opers());
+ if (ServerInstance->usercount_unknown())
+ user->WriteServ("253 %s %d :unknown connections",user->nick,ServerInstance->usercount_unknown());
+ if (ServerInstance->chancount())
+ user->WriteServ("254 %s %d :channels formed",user->nick,ServerInstance->chancount());
+ if (ServerInstance->local_count())
+ user->WriteServ("254 %s :I have %d clients and 0 servers",user->nick,ServerInstance->local_count());
}
+