]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_ison.cpp
* Fix inspsocket to not include uio.h on windows.
[user/henk/code/inspircd.git] / src / commands / cmd_ison.cpp
index 423535da3268b443b20789ab557c38efccebf57d..ca7639b586f0fa2f45e56b717bf9be140e174fab 100644 (file)
  */
 
 #include "inspircd.h"
-#include "commands/cmd_ison.h"
 
-extern "C" DllExport Command* init_command(InspIRCd* Instance)
+#ifndef __CMD_ISON_H__
+#define __CMD_ISON_H__
+
+// include the common header files
+
+#include "users.h"
+#include "channels.h"
+
+/** Handle /ISON. These command handlers can be reloaded by the core,
+ * and handle basic RFC1459 commands. Commands within modules work
+ * the same way, however, they can be fully unloaded, where these
+ * may not.
+ */
+class CommandIson : public Command
 {
-       return new CommandIson(Instance);
-}
+ public:
+       /** Constructor for ison.
+        */
+       CommandIson ( Module* parent) : Command(parent,"ISON",0,0) { syntax = "<nick> {nick}"; }
+       /** Handle command.
+        * @param parameters The parameters to the comamnd
+        * @param pcnt The number of parameters passed to teh command
+        * @param user The user issuing the command
+        * @return A value from CmdResult to indicate command success or failure.
+        */
+       CmdResult Handle(const std::vector<std::string>& parameters, User *user);
+};
+
+#endif
+
 
 /** Handle /ISON
  */
@@ -35,9 +60,6 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User
 
                if (u)
                {
-                       if (u->Visibility && !u->Visibility->VisibleTo(user))
-                               continue;
-
                        reply.append(u->nick).append(" ");
                        if (reply.length() > 450)
                        {
@@ -63,9 +85,6 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User
 
                                        if (u)
                                        {
-                                               if (u->Visibility && !u->Visibility->VisibleTo(user))
-                                                       continue;
-
                                                reply.append(u->nick).append(" ");
                                                if (reply.length() > 450)
                                                {
@@ -85,3 +104,5 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User
        return CMD_SUCCESS;
 }
 
+
+COMMAND_INIT(CommandIson)