diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-08 00:52:18 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-08 00:52:18 +0000 |
commit | f5021f5e8b0de466e116da3049703319959d5d7f (patch) | |
tree | 8cf3bde875eb81a8cbed21800319538c8272e2e5 | |
parent | 229d25be84c71e15085c4251e2e805f68b53336f (diff) |
Fixes to m_filter to check its config file exists!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@440 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_filter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index d975e13c1..9459d309f 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -28,12 +28,12 @@ class ModuleFilter : public Module Srv = new Server; Conf = new ConfigReader; std::string filterfile = Conf->ReadValue("filter","file",0); - if (filterfile == "") + MyConf = new ConfigReader(filterfile); + if ((filterfile == "") || (!MyConf->Verify())) { printf("Error, could not find <filter file=\"\"> definition in your config file!"); exit(0); } - MyConf = new ConfigReader(filterfile); Srv->Log(DEFAULT,std::string("m_filter: read configuration from ")+filterfile); } @@ -150,14 +150,14 @@ class ModuleFilter : public Module delete MyConf; Conf = new ConfigReader; std::string filterfile = Conf->ReadValue("filter","file",0); - if (filterfile == "") + // this automatically re-reads the configuration file into the class + MyConf = new ConfigReader(filterfile); + if ((filterfile == "")|| (!MyConf->Verify())) { // bail if the user forgot to create a config file printf("Error, could not find <filter file=\"\"> definition in your config file!"); exit(0); } - // this automatically re-reads the configuration file into the class - MyConf = new ConfigReader(filterfile); Srv->Log(DEFAULT,std::string("m_filter: read configuration from ")+filterfile); } |