- DELETE(conf);
- }
-
- virtual int 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 0;
- }
-
- virtual int OnUserPreMessage(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_PRIVMSG, chan, user, status, text, exempt_list);
- }
-
- return 0;
- }
-
- virtual void OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text)
- {
- BuildDeafList(message_type, chan, sender, status, text, exempt_list);
- }
-
- virtual void BuildDeafList(MessageType message_type, Channel* chan, User* sender, char status, const std::string &text, CUList &exempt_list)
- {
- CUList *ulist;
- bool is_a_uline;
- bool is_bypasschar, is_bypasschar_avail;
- bool is_bypasschar_uline, is_bypasschar_uline_avail;
-
- is_bypasschar = is_bypasschar_avail = is_bypasschar_uline = is_bypasschar_uline_avail = 0;
- if (!deaf_bypasschars.empty())
- {
- is_bypasschar_avail = 1;
- if (deaf_bypasschars.find(text[0], 0) != string::npos)
- is_bypasschar = 1;
- }
- if (!deaf_bypasschars_uline.empty())
- {
- is_bypasschar_uline_avail = 1;
- if (deaf_bypasschars_uline.find(text[0], 0) != string::npos)
- is_bypasschar_uline = 1;
- }