]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_inviteexception.cpp
Fix merge FJOIN debug message
[user/henk/code/inspircd.git] / src / modules / m_inviteexception.cpp
index dccba06b3cdac94614d2d849e02903f6a514a7a2..af30860165499668501c90f1e0595ebafb69ec7f 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -69,7 +69,7 @@ public:
                                std::string mask = std::string(user->nick) + "!" + user->ident + "@" + user->GetIPString();
                                for (modelist::iterator it = list->begin(); it != list->end(); it++)
                                {
-                                       if(InspIRCd::Match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (InspIRCd::Match(mask, it->mask, true)))
+                                       if(InspIRCd::Match(user->GetFullRealHost(), it->mask) || InspIRCd::Match(user->GetFullHost(), it->mask) || (InspIRCd::MatchCIDR(mask, it->mask)))
                                        {
                                                // They match an entry on the list, so let them in.
                                                return 1;
@@ -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) || match(LM->user->GetFullHost(), it->mask.c_str()) || (InspIRCd::Match(mask, it->mask, true)))
-                                       {
-                                               // They match an entry
-                                               return (char*)it->mask.c_str();
-                                       }
-                               }
-                               return NULL;
-                       }
-               }
-               return NULL;
+               return ie->DoOnRequest(request);
        }
 
        virtual void OnCleanup(int target_type, void* item)
@@ -128,7 +109,7 @@ public:
 
        virtual Version GetVersion()
        {
-               return Version(1, 2, 0, 3, VF_VENDOR | VF_COMMON, API_VERSION);
+               return Version("$Id$", VF_VENDOR | VF_COMMON, API_VERSION);
        }
 
        ~ModuleInviteException()