- }
-
- return MODEACTION_ALLOW;
- }
-};
-
-class ModuleCensor : public Module
-{
-
- Server *Srv;
- censor_t censors;
- CensorUser *cu;
- CensorChannel *cc;
-
- public:
- ModuleCensor(Server* Me)
- : Module::Module(Me)
- {
- /*
- * read the configuration file on startup.
- * it is perfectly valid to set <censor file> to the value of the
- * main config file, then append your <badword> tags to the bottom
- * of the main config... but rather messy. That's why the capability
- * of using a seperate config file is provided.
- *
- * XXX - Really, it'd be nice to scraip this kind of thing, and have something like
- * an include directive to include additional configuration files. Might make our lives easier. --w00t
- *
- * XXX - These module pre-date the include directive which exists since beta 5 -- Brain
- */
- Srv = Me;
- OnRehash("");
- cu = new CensorUser;
- cc = new CensorChannel;
- Srv->AddMode(cu, 'G');
- Srv->AddMode(cc, 'G');
- }
-
- void Implements(char* List)
- {
- List[I_OnRehash] = List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
- }
-