-
- ModuleChanFilter(Server* Me)
- : Module::Module(Me)
- {
- Srv = Me;
- Conf = new ConfigReader;
- Srv->AddExtendedListMode('g');
- MaxEntries = Conf->ReadInteger("chanfilter","maxsize",0,true);
- if (MaxEntries == 0)
- MaxEntries = 32;
- }
-
- virtual void On005Numeric(std::string &output)
- {
- std::stringstream line(output);
- std::string temp1, temp2;
- while (!line.eof())
- {
- line >> temp1;
- if (temp1.substr(0,10) == "CHANMODES=")
- {
- // append the chanmode to the end
- temp1 = temp1.substr(10,temp1.length());
- temp1 = "CHANMODES=g" + temp1;
- }
- temp2 = temp2 + temp1 + " ";
- }
- if (temp2.length())
- output = temp2.substr(0,temp2.length()-1);
- }
-
- virtual void OnUserPart(userrec* user, chanrec* channel)
+ unsigned long maxlen;
+
+ ChanFilter(Module* Creator) : ListModeBase(Creator, "filter", 'g', "End of channel spamfilter list", 941, 940, false, "chanfilter") { }
+
+ bool ValidateParam(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE