From 3ea5a27cd34d16c69dc9e2a480a3791de4db0124 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 27 Oct 2006 07:22:05 +0000 Subject: remove - This is no longer neccessary as we've had includes for quite a while now. It's still required for m_helpop, because the helpop.conf has tags which clash with the main config's tags (e.g. , ) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5548 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_filter_pcre.cpp | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 03cecffb7..96956e3d8 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -26,17 +26,6 @@ #include "modules.h" #include "inspircd.h" -/** Thrown by m_filter_pcre - */ -class FilterPCREException : public ModuleException -{ - public: - virtual const char* GetReason() - { - return "Could not find definition in your config file!"; - } -}; - /* $ModDesc: m_filter with regexps */ /* $CompileFlags: `pcre-config --cflags` */ /* $LinkerFlags: `pcre-config --libs` `perl extra/pcre_rpath.pl` -lpcre */ @@ -140,25 +129,13 @@ class ModuleFilterPCRE : public Module * of using a seperate config file is provided. */ - ConfigReader Conf(Srv); - - std::string filterfile = Conf.ReadValue("filter", "file", 0); - - ConfigReader MyConf(Srv, filterfile); - - if (filterfile.empty() || !MyConf.Verify()) - { - FilterPCREException e; - throw(e); - } - - ServerInstance->Log(DEFAULT,"m_filter_pcre: read configuration from "+filterfile); + ConfigReader MyConf(Srv); for (std::vector::iterator i = filters.begin(); i != filters.end(); i++) pcre_free((*i).regexp); - + filters.clear(); - + for (int index = 0; index < MyConf.Enumerate("keyword"); index++) { std::string pattern = MyConf.ReadValue("keyword","pattern",index); -- cgit v1.2.3