From 90909af6eacd6bc1caeccd6b6acad917f4020fe6 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 4 Mar 2006 17:34:07 +0000 Subject: Fixed bugs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3449 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_filter.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 3b687166f..1731da798 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -31,6 +31,7 @@ using namespace std; class Filter { + public: std::string reason; std::string action; }; @@ -49,7 +50,6 @@ class FilterException : public ModuleException class ModuleFilter : public Module { Server *Srv; - ConfigReader *Conf, *MyConf; filter_t filters; public: @@ -67,8 +67,6 @@ class ModuleFilter : public Module virtual ~ModuleFilter() { - delete MyConf; - delete Conf; } void Implements(char* List) @@ -90,7 +88,7 @@ class ModuleFilter : public Module { 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) @@ -130,10 +128,10 @@ class ModuleFilter : public Module { // 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 -- cgit v1.2.3