]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setidle.cpp
Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists
[user/henk/code/inspircd.git] / src / modules / m_setidle.cpp
index c83c7e7e021eaf2f06e46849033d061a773a405b..f6584aef6bb2b9e0f99519e72e1e62077154ee33 100644 (file)
@@ -21,18 +21,17 @@ using namespace std;
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "helperfuncs.h"
+
 #include "inspircd.h"
 
 /* $ModDesc: Allows opers to set their idle time */
 
-static Server *Srv = NULL;
-extern InspIRCd* ServerInstance;
+
 
 class cmd_setidle : public command_t
 {
  public:
      cmd_setidle () : command_t("SETIDLE", 'o', 1)
cmd_setidle (InspIRCd* Instance) : command_t(Instance,"SETIDLE", 'o', 1)
        {
                this->source = "m_setidle.so";
                syntax = "<idle-seconds>";
@@ -59,12 +58,12 @@ class ModuleSetIdle : public Module
 {
        cmd_setidle*    mycommand;
  public:
-       ModuleSetIdle(Server* Me)
+       ModuleSetIdle(InspIRCd* Me)
                : Module::Module(Me)
        {
-               Srv = Me;
-               mycommand = new cmd_setidle();
-               Srv->AddCommand(mycommand);
+               
+               mycommand = new cmd_setidle(ServerInstance);
+               ServerInstance->AddCommand(mycommand);
        }
        
        virtual ~ModuleSetIdle()
@@ -91,7 +90,7 @@ class ModuleSetIdleFactory : public ModuleFactory
        {
        }
        
-       virtual Module * CreateModule(Server* Me)
+       virtual Module * CreateModule(InspIRCd* Me)
        {
                return new ModuleSetIdle(Me);
        }