- ModuleCensor(InspIRCd* Me)
- : Module(Me)
- {
- /* Read the configuration file on startup.
- */
- OnRehash(NULL,"");
- cu = new CensorUser(ServerInstance);
- cc = new CensorChannel(ServerInstance);
- if (!ServerInstance->Modes->AddMode(cu) || !ServerInstance->Modes->AddMode(cc))
- {
- delete cu;
- delete cc;
- throw ModuleException("Could not add new modes!");
- }
- Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 3);
- }
-
-
- virtual ~ModuleCensor()
- {
- ServerInstance->Modes->DelMode(cu);
- ServerInstance->Modes->DelMode(cc);
- delete cu;
- delete cc;
- }
-
- virtual void ReplaceLine(irc::string &text, irc::string pattern, irc::string replace)
+ ModuleCensor()
+ : exemptionprov(this)
+ , cu(this, "u_censor", 'G')
+ , cc(this, "censor", 'G')