]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_ison.cpp
Use safe iter for deleting while iterating
[user/henk/code/inspircd.git] / src / cmd_ison.cpp
index fd6e92df233f9e56f44126bf1945238aa50e66fb..851f8e171fd774a783c21d8d2f7eb18055283a62 100644 (file)
@@ -2,29 +2,27 @@
  *       | 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_config.h"
-#include "ctables.h"
 #include "users.h"
-#include "commands.h"
-#include "helperfuncs.h"
 #include "inspircd.h"
 #include "commands/cmd_ison.h"
 
+extern "C" command_t* init_command(InspIRCd* Instance)
+{
+       return new cmd_ison(Instance);
+}
 
-
-void cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
+/** Handle /ISON
+ */
+CmdResult cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
 {
        char retbuf[MAXBUF];
        userrec *u;
@@ -42,5 +40,8 @@ void cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
                }
        }
 
-       user->WriteServ( retbuf);
+       user->WriteServ(retbuf);
+
+       return CMD_SUCCESS;
 }
+