summaryrefslogtreecommitdiff
path: root/src/cmd_lusers.cpp
diff options
context:
space:
mode:
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());
}
+