class Filter
{
+ public:
std::string reason;
std::string action;
};
class ModuleFilter : public Module
{
Server *Srv;
- ConfigReader *Conf, *MyConf;
filter_t filters;
public:
virtual ~ModuleFilter()
{
- delete MyConf;
- delete Conf;
}
void Implements(char* List)
{
if ((Srv->MatchText(text2,index->first)) || (Srv->MatchText(text,index->first)))
{
- Filter* f = (Filter*)*x->second;
+ Filter* f = (Filter*)index->second;
std::string target = "";
if (target_type == TYPE_USER)
{
// reload our config file on rehash - we must destroy and re-allocate the classes
// to call the constructor again and re-read our data.
- Conf = new ConfigReader;
+ ConfigReader* Conf = new ConfigReader;
std::string filterfile = Conf->ReadValue("filter","file",0);
// this automatically re-reads the configuration file into the class
- MyConf = new ConfigReader(filterfile);
+ ConfigReader* MyConf = new ConfigReader(filterfile);
if ((filterfile == "") || (!MyConf->Verify()))
{
// bail if the user forgot to create a config file