]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
Added <oper:swhois> to m_swhois, which will override <type:swhois> if specified
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index 300d13b4ab67d039949ca4cf6527ca2b3d5d4d47..8ceee3566af29ff034802b95fe6b461ae8e86441 100644 (file)
@@ -18,7 +18,8 @@
 #include "channels.h"
 #include "modules.h"
 #include "hashcomp.h"
-#include "helperfuncs.h"
+
+#include "inspircd.h"
 
 /* $ModDesc: Implements config tags which allow blocking of joins to channels */
 
@@ -26,20 +27,20 @@ class ModuleDenyChannels : public Module
 {
  private:
 
-       Server *Srv;
+       
        ConfigReader *Conf;
 
  public:
-       ModuleDenyChannels(Server* Me) : Module::Module(Me)
+       ModuleDenyChannels(InspIRCd* Me) : Module::Module(Me)
        {
-               Srv = Me;
-               Conf = new ConfigReader;
+               
+               Conf = new ConfigReader(ServerInstance);
        }
        
        virtual void OnRehash(const std::string &param)
        {
                DELETE(Conf);
-               Conf = new ConfigReader;
+               Conf = new ConfigReader(ServerInstance);
        }
        
        virtual ~ModuleDenyChannels()
@@ -49,7 +50,7 @@ class ModuleDenyChannels : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,1,VF_VENDOR);
+               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
        }
 
        void Implements(char* List)
@@ -57,7 +58,7 @@ class ModuleDenyChannels : public Module
                List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
        }
 
-       virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+       virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
        {
                for (int j =0; j < Conf->Enumerate("badchan"); j++)
                {
@@ -94,7 +95,7 @@ class ModuleDenyChannelsFactory : public ModuleFactory
        {
        }
        
-       virtual Module * CreateModule(Server* Me)
+       virtual Module * CreateModule(InspIRCd* Me)
        {
                return new ModuleDenyChannels(Me);
        }