]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_lusers.cpp
Move a bundle of stuff to server.cpp from inspircd.cpp
[user/henk/code/inspircd.git] / src / cmd_lusers.cpp
index 39f0930724231dfc76063f072da3d4daec4cff6a..fa58ca076619251285d9a4dc2a7fbc19eef25750 100644 (file)
@@ -2,27 +2,28 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *                <Craig@chatspike.net>
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
  *
- * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
+#include "inspircd.h"
 #include "users.h"
-#include "commands.h"
-#include "helperfuncs.h"
 #include "inspircd.h"
 #include "commands/cmd_lusers.h"
 
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
+{
+       return new cmd_lusers(Instance);
+}
 
-
-void cmd_lusers::Handle (const char** parameters, int pcnt, userrec *user)
+/** Handle /LUSERS
+ */
+CmdResult 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.
@@ -34,6 +35,8 @@ void cmd_lusers::Handle (const char** parameters, int pcnt, userrec *user)
        if (ServerInstance->ChannelCount())
                user->WriteServ("254 %s %d :channels formed",user->nick,ServerInstance->ChannelCount());
        if (ServerInstance->LocalUserCount())
-               user->WriteServ("254 %s :I have %d clients and 0 servers",user->nick,ServerInstance->LocalUserCount());
+               user->WriteServ("255 %s :I have %d clients and 0 servers",user->nick,ServerInstance->LocalUserCount());
+
+       return CMD_SUCCESS;
 }