]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_clearcache.cpp
DLLFactory--
[user/henk/code/inspircd.git] / src / commands / cmd_clearcache.cpp
index 151587f12440be4c2e0aec45c31ecb75af403e1f..2334e597ce8c41fbef54e0169608933ab24916a2 100644 (file)
  */
 
 #include "inspircd.h"
-#include "commands/cmd_clearcache.h"
 
-extern "C" DllExport Command* init_command(InspIRCd* Instance)
+#ifndef __CMD_ADMIN_H__
+#define __CMD_ADMIN_H__
+
+#include "users.h"
+#include "channels.h"
+#include "ctables.h"
+
+/** Handle /ADMIN. 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 CommandClearcache : public Command
 {
-       return new CommandClearcache(Instance);
-}
+ public:
+       /** Constructor for clearcache.
+        */
+       CommandClearcache ( Module* parent) : Command(parent,"CLEARCACHE",0) { flags_needed = 'o'; }
+       /** 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 /CLEARCACHE
  */
@@ -27,3 +51,5 @@ CmdResult CommandClearcache::Handle (const std::vector<std::string>& parameters,
        user->WriteServ("NOTICE %s :*** Cleared DNS cache of %d items.", user->nick.c_str(), n);
        return CMD_SUCCESS;
 }
+
+COMMAND_INIT(CommandClearcache)