From 49a21413eeb84cc6605b996233a02c406a1e6f9a Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:33:27 +0000 Subject: Fix cloaking/invite exception for new extban checks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11713 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/modules/m_cloaking.cpp') diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 221c23d64..50bb4c4b6 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -305,19 +305,16 @@ class ModuleCloaking : public Module } } - ModResult OnCheckBan(User* user, Channel* chan) + ModResult OnCheckBan(User* user, Channel* chan, const std::string& mask) { - char mask[MAXBUF]; + char cmask[MAXBUF]; std::string* cloak = cu->ext.get(user); /* Check if they have a cloaked host, but are not using it */ if (cloak && *cloak != user->dhost) { - snprintf(mask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), cloak->c_str()); - for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++) - { - if (InspIRCd::Match(mask,i->data)) - return MOD_RES_DENY; - } + snprintf(cmask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), cloak->c_str()); + if (InspIRCd::Match(cmask,mask)) + return MOD_RES_DENY; } return MOD_RES_PASSTHRU; } -- cgit v1.2.3