]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setidle.cpp
Fixified some more
[user/henk/code/inspircd.git] / src / modules / m_setidle.cpp
index e16369aa4b30e60afe4f17a4160dffcf9eb875f1..9207ad7962282c3d8fb00a5e6fb515ecf2c09d23 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,13 +49,13 @@ 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);
        }
        
@@ -67,7 +65,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);
        }
 };