#include "users.h"
#include "channels.h"
#include "modules.h"
-#include "helperfuncs.h"
+
+#include "inspircd.h"
/* $ModDesc: Only opers may create new channels if this module is loaded */
class ModuleRestrictChans : public Module
{
- Server* Srv;
+
std::map<irc::string,int> allowchans;
void ReadConfig()
{
- ConfigReader* MyConf = new ConfigReader();
+ ConfigReader* MyConf = new ConfigReader(ServerInstance);
allowchans.clear();
for (int i = 0; i < MyConf->Enumerate("allowchannel"); i++)
{
}
public:
- ModuleRestrictChans(Server* Me)
+ ModuleRestrictChans(InspIRCd* Me)
: Module::Module(Me)
{
- Srv = Me;
+
ReadConfig();
}
{
}
- virtual Module * CreateModule(Server* Me)
+ virtual Module * CreateModule(InspIRCd* Me)
{
return new ModuleRestrictChans(Me);
}