]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setidle.cpp
Some more to fix still, modules probably wont load correctly atm
[user/henk/code/inspircd.git] / src / modules / m_setidle.cpp
index e16369aa4b30e60afe4f17a4160dffcf9eb875f1..847aa91117ff799ee9db9b7f2f821df6941dab35 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 /* $ModDesc: Allows opers to set their idle time */
 
 /** Handle /SETIDLE
  */
-class cmd_setidle : public command_t
+class CommandSetidle : public Command
 {
  public:
-       cmd_setidle (InspIRCd* Instance) : command_t(Instance,"SETIDLE", 'o', 1)
+       CommandSetidle (InspIRCd* Instance) : Command(Instance,"SETIDLE", 'o', 1)
        {
                this->source = "m_setidle.so";
                syntax = "<duration>";
+               TRANSLATE2(TR_TEXT, TR_END);
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, User *user)
        {
                time_t idle = ServerInstance->Duration(parameters[0]);
                if (idle < 1)
@@ -51,14 +49,15 @@ class cmd_setidle : public command_t
 
 class ModuleSetIdle : public Module
 {
-       cmd_setidle*    mycommand;
+       CommandSetidle* mycommand;
  public:
        ModuleSetIdle(InspIRCd* Me)
                : Module(Me)
        {
                
-               mycommand = new cmd_setidle(ServerInstance);
+               mycommand = new CommandSetidle(ServerInstance);
                ServerInstance->AddCommand(mycommand);
+
        }
        
        virtual ~ModuleSetIdle()
@@ -67,7 +66,7 @@ class ModuleSetIdle : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 };