summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-10 17:59:50 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-10 17:59:50 +0000
commit745994473896e59faa59e4caf3fb621ef974419a (patch)
treec7416f31949c255a2dbe0ec36ce6274353095852 /src/modules
parent9f477a1083574d01c78f12d95772ed122607a4ad (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp2
-rw-r--r--src/modules/m_filter.cpp7
-rw-r--r--src/modules/m_filter.h10
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);
}