- }
- else
- {
- if (channel->IsModeSet('G'))
- {
- channel->SetMode('G',false);
- return MODEACTION_ALLOW;
- }
- }
-
- return MODEACTION_ALLOW;
- }
-};
-
-class ModuleCensor : public Module
-{
-
-
- censor_t censors;
- CensorUser *cu;
- CensorChannel *cc;
-
- public:
- ModuleCensor(InspIRCd* 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
- */
-
- OnRehash("");
- cu = new CensorUser(ServerInstance);
- cc = new CensorChannel(ServerInstance);
- ServerInstance->AddMode(cu, 'G');
- ServerInstance->AddMode(cc, 'G');
- }
-
- void Implements(char* List)
- {
- List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
- }