]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictchans.cpp
This works, not sure why. Someone find out why we cant use && !isock->HasResult(...
[user/henk/code/inspircd.git] / src / modules / m_restrictchans.cpp
index 4f8bc04bd64e53a02d8f780cc6851c2f378dec63..e61e8ac0d6c44769448354c8166a4822137467dd 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 /* $ModDesc: Only opers may create new channels if this module is loaded */
 
@@ -46,7 +43,7 @@ class ModuleRestrictChans : public Module
                ReadConfig();
        }
 
-       virtual void OnRehash(userrec* user, const std::string &parameter)
+       virtual void OnRehash(User* user, const std::string &parameter)
        {
                ReadConfig();
        }
@@ -56,7 +53,7 @@ class ModuleRestrictChans : public Module
                List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
        }
        
-       virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
        {
                irc::string x = cname;
                // user is not an oper and its not in the allow list
@@ -82,28 +79,4 @@ class ModuleRestrictChans : public Module
        }
 };
 
-
-class ModuleRestrictChansFactory : public ModuleFactory
-{
- public:
-       ModuleRestrictChansFactory()
-       {
-       }
-       
-       ~ModuleRestrictChansFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleRestrictChans(Me);
-       }
-       
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleRestrictChansFactory;
-}
-
+MODULE_INIT(ModuleRestrictChans)