- if (!ServerInstance->Modes->AddMode(&m1))
- throw ModuleException("Could not add new modes!");
-
- OnRehash(NULL);
- Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
- }
-
-
- virtual void OnRehash(User* user)
- {
- ConfigReader conf;
- deaf_bypasschars = conf.ReadValue("deaf", "bypasschars", 0);
- deaf_bypasschars_uline = conf.ReadValue("deaf", "bypasscharsuline", 0);
- }
-
- virtual ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
- {
- if (target_type == TYPE_CHANNEL)
- {
- Channel* chan = (Channel*)dest;
- if (chan)
- this->BuildDeafList(MSG_NOTICE, chan, user, status, text, exempt_list);
- }
-
- return MOD_RES_PASSTHRU;