- Srv = Me;
- Conf = new ConfigReader;
- std::string Censorfile = Conf->ReadValue("censor","file",0);
- MyConf = new ConfigReader(Censorfile);
- if ((Censorfile == "") || (!MyConf->Verify()))
- {
- printf("Error, could not find <censor file=\"\"> definition in your config file!");
- log(DEFAULT,"Error, could not find <censor file=\"\"> definition in your config file!");
- return;
- }
- Srv->Log(DEFAULT,std::string("m_censor: read configuration from ")+Censorfile);
- Srv->AddExtendedMode('G',MT_CHANNEL,false,0,0);
- Srv->AddExtendedMode('G',MT_CLIENT,false,0,0);
+ OnRehash(NULL);
+ if (!ServerInstance->Modes->AddMode(&cu) || !ServerInstance->Modes->AddMode(&cc))
+ throw ModuleException("Could not add new modes!");
+ Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnRunTestSuite };
+ ServerInstance->Modules->Attach(eventlist, this, 4);