summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-06 13:04:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-06 13:04:26 +0000
commite853ec6473b874506b2036de2f76d6ae7cd34325 (patch)
treebc526fc126c362ea3217ae710b4e0b38a8702947 /src
parentda011c234878c0520439949c8b12922f131c8a8c (diff)
Newer extban-supporting listmode api
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10407 e03df62e-2008-0410-955e-edbf42e46eb7
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)