summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_banexception.cpp21
-rw-r--r--src/modules/m_chanfilter.cpp5
-rw-r--r--src/modules/m_inviteexception.cpp21
3 files changed, 7 insertions, 40 deletions
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index 34a52f82b..15c151aa5 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -159,26 +159,7 @@ public:
virtual const char* OnRequest(Request* request)
{
- ListModeRequest* LM = (ListModeRequest*)request;
- if (strcmp("LM_CHECKLIST", request->GetId()) == 0)
- {
- modelist* list;
- LM->chan->GetExt(be->GetInfoKey(), list);
- if (list)
- {
- std::string mask = std::string(LM->user->nick) + "!" + LM->user->ident + "@" + LM->user->GetIPString();
- for (modelist::iterator it = list->begin(); it != list->end(); it++)
- {
- if (InspIRCd::Match(LM->user->GetFullRealHost(), it->mask) || InspIRCd::Match(LM->user->GetFullHost(), it->mask) || (InspIRCd::MatchCIDR(mask, it->mask)))
- {
- // They match an entry
- return (char*)it->mask.c_str();
- }
- }
- return NULL;
- }
- }
- return NULL;
+ return be->DoOnRequest(request);
}
virtual Version GetVersion()
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 50df5b1cc..e33be91d9 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -121,6 +121,11 @@ class ModuleChanFilter : public Module
cf->DoCleanup(target_type, item);
}
+ virtual const char* OnRequest(Request* request)
+ {
+ return cf->DoOnRequest(request);
+ }
+
virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index 40c92363a..58c02dcd2 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -84,26 +84,7 @@ public:
virtual const char* OnRequest(Request* request)
{
- ListModeRequest* LM = (ListModeRequest*)request;
- if (strcmp("LM_CHECKLIST", request->GetId()) == 0)
- {
- modelist* list;
- LM->chan->GetExt(ie->GetInfoKey(), list);
- if (list)
- {
- std::string mask = std::string(LM->user->nick) + "!" + LM->user->ident + "@" + LM->user->GetIPString();
- for (modelist::iterator it = list->begin(); it != list->end(); it++)
- {
- if (InspIRCd::Match(LM->user->GetFullRealHost(), it->mask) || InspIRCd::Match(LM->user->GetFullHost(), it->mask.c_str()) || (InspIRCd::MatchCIDR(mask, it->mask)))
- {
- // They match an entry
- return it->mask.c_str();
- }
- }
- return NULL;
- }
- }
- return NULL;
+ return ie->DoOnRequest(request);
}
virtual void OnCleanup(int target_type, void* item)