#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 */
{
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 ¶m)
{
DELETE(Conf);
- Conf = new ConfigReader;
+ Conf = new ConfigReader(ServerInstance);
}
virtual ~ModuleDenyChannels()
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++)
{
{
}
- virtual Module * CreateModule(Server* Me)
+ virtual Module * CreateModule(InspIRCd* Me)
{
return new ModuleDenyChannels(Me);
}