*/
#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
*/
if (u)
{
- if (u->Visibility && !u->Visibility->VisibleTo(user))
- continue;
-
reply.append(u->nick).append(" ");
if (reply.length() > 450)
{
if (u)
{
- if (u->Visibility && !u->Visibility->VisibleTo(user))
- continue;
-
reply.append(u->nick).append(" ");
if (reply.length() > 450)
{
return CMD_SUCCESS;
}
+
+COMMAND_INIT(CommandIson)