diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 7 | ||||
-rw-r--r-- | 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 <filter file> to the value of the - // main config file, then append your <keyword> 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 = "<filter-definition> <type> [<gline-duration>] :<reason>"; } 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); } |