- spamlist = new SpamList;
- chan->Extend("spam_list",(char*)spamlist);
- }
- if (spamlist->size() < (unsigned)MaxEntries)
- {
- if (word.length() > 35)
- {
- WriteServ(user->fd,"935 %s %s %s :word is too long for censor list",user->nick, chan->name,word.c_str());
- return -1;
- }
- for (SpamList::iterator i = spamlist->begin(); i != spamlist->end(); i++)
- {
- if (*i == word)
- {
- WriteServ(user->fd,"937 %s %s :The word %s is already on the spamfilter list",user->nick, chan->name,word.c_str());
- return -1;
- }
- }
- spamlist->push_back(word);
+ 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());