* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
cf->DoImplements(this);
Implementation eventlist[] = { I_OnCleanup, I_OnChannelDelete, I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnSyncChannel };
ServerInstance->Modules->Attach(eventlist, this, 6);
+
+ ServerInstance->Modules->PublishInterface("ChannelBanList", this);
}
virtual void OnChannelDelete(Channel* chan)
if (!IS_LOCAL(user) || (CHANOPS_EXEMPT(ServerInstance, 'g') && chan->GetStatus(user) == STATUS_OP))
return 0;
- // Create a copy of the string in irc::string
- irc::string line = text.c_str();
-
modelist* list;
chan->GetExt(cf->GetInfoKey(), list);
{
for (modelist::iterator i = list->begin(); i != list->end(); i++)
{
- if (line.find(i->mask.c_str()) != std::string::npos)
+ if (InspIRCd::Match(text, i->mask))
{
user->WriteNumeric(936, "%s %s %s :Your message contained a censored word, and was blocked",user->nick.c_str(), chan->name.c_str(), i->mask.c_str());
return 1;
cf->DoCleanup(target_type, item);
}
+ virtual const char* OnRequest(Request* request)
+ {
+ return cf->DoOnRequest(request);
+ }
+
virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
{
ServerInstance->Modes->DelMode(cf);
delete cf;
+ ServerInstance->Modules->UnpublishInterface("ChannelBanList", this);
}
};