]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
Socket engine tweaks to fix a glitch, and improvements to new m_ident
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index d143bffbf7c81f2a7423402e4f065501d07ded0e..d345570c0ac8fe7cab9c992b2d4dc646f66ddf93 100644 (file)
  * ---------------------------------------------------
  */
 
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-#include "hashcomp.h"
 #include "inspircd.h"
 #include "wildcard.h"
 
@@ -34,7 +30,7 @@ class ModuleDenyChannels : public Module
                Conf = new ConfigReader(ServerInstance);
        }
        
-       virtual void OnRehash(userrec* user, const std::string &param)
+       virtual void OnRehash(User* user, const std::string &param)
        {
                DELETE(Conf);
                Conf = new ConfigReader(ServerInstance);
@@ -55,7 +51,7 @@ class ModuleDenyChannels : 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)
        {
                for (int j =0; j < Conf->Enumerate("badchan"); j++)
                {
@@ -77,29 +73,4 @@ class ModuleDenyChannels : public Module
        }
 };
 
-// stuff down here is the module-factory stuff. For basic modules you can ignore this.
-
-class ModuleDenyChannelsFactory : public ModuleFactory
-{
- public:
-       ModuleDenyChannelsFactory()
-       {
-       }
-       
-       ~ModuleDenyChannelsFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleDenyChannels(Me);
-       }
-       
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleDenyChannelsFactory;
-}
-
+MODULE_INIT(ModuleDenyChannels)