- bool silent = false;
-
- if (!user)
- return this->GetUserCounter();
-
- UCListIter i = user->chans.find(this);
- if (i != user->chans.end())
+ ModResult result;
+ FIRST_MOD_RESULT(OnCheckBan, result, (user, this, mask));
+ if (result != MOD_RES_PASSTHRU)
+ return (result == MOD_RES_DENY);
+
+ // extbans were handled above, if this is one it obviously didn't match
+ if ((mask.length() <= 2) || (mask[1] == ':'))
+ return false;
+
+ std::string::size_type at = mask.find('@');
+ if (at == std::string::npos)
+ return false;
+
+ char tomatch[MAXBUF];
+ snprintf(tomatch, MAXBUF, "%s!%s", user->nick.c_str(), user->ident.c_str());
+ std::string prefix = mask.substr(0, at);
+ if (InspIRCd::Match(tomatch, prefix, NULL))