From 745994473896e59faa59e4caf3fb621ef974419a Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 10 Nov 2006 17:59:50 +0000 Subject: Oops, forgot command source, these wouldnt be able to be unloaded properly git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5668 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_filter_pcre.cpp | 2 +- src/modules/m_filter.cpp | 7 +------ src/modules/m_filter.h | 10 ++++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 8d50193af..14b4d6d4a 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -53,7 +53,7 @@ class ModuleFilterPCRE : public FilterBase public: ModuleFilterPCRE(InspIRCd* Me) - : FilterBase::FilterBase(Me) + : FilterBase::FilterBase(Me, "m_filter_pcre.so") { OnRehash(""); } diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 4942b7fb4..0b6c386ba 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -40,13 +40,8 @@ class ModuleFilter : public FilterBase public: ModuleFilter(InspIRCd* Me) - : FilterBase::FilterBase(Me) + : FilterBase::FilterBase(Me, "m_filter.so") { - // read the configuration file on startup. - // it is perfectly valid to set to the value of the - // main config file, then append your tags to the bottom - // of the main config... but rather messy. That's why the capability - // of using a seperate config file is provided. OnRehash(""); } diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h index bd6320e3f..437928a29 100644 --- a/src/modules/m_filter.h +++ b/src/modules/m_filter.h @@ -42,7 +42,7 @@ class FilterBase : public Module { cmd_filter* filtcommand; public: - FilterBase(InspIRCd* Me); + FilterBase(InspIRCd* Me, const std::string &source); virtual ~FilterBase(); virtual void Implements(char* List); virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status); @@ -58,8 +58,10 @@ class cmd_filter : public command_t { FilterBase* Base; public: - cmd_filter(FilterBase* f, InspIRCd* Me) : command_t(Me, "FILTER", 'o', 1), Base(f) + cmd_filter(FilterBase* f, InspIRCd* Me, const std::string &source) : command_t(Me, "FILTER", 'o', 1), Base(f) { + this->source = source; + this->syntax = " [] :"; } CmdResult Handle(const char** parameters, int pcnt, userrec *user) @@ -140,9 +142,9 @@ class cmd_filter : public command_t } }; -FilterBase::FilterBase(InspIRCd* Me) : Module::Module(Me) +FilterBase::FilterBase(InspIRCd* Me, const std::string &source) : Module::Module(Me) { - filtcommand = new cmd_filter(this, Me); + filtcommand = new cmd_filter(this, Me, source); ServerInstance->AddCommand(filtcommand); } -- cgit v1.2.3