- int result = 0;
- FOREACH_RESULT_MAP(I_OnCheckExtBan, OnCheckExtBan(user, this, type),
- result = banmatch_reduce(result, MOD_RESULT);
- );
-
- if (result)
- return result;
-
- char mask[MAXBUF];
- int rv = 0;
- snprintf(mask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), user->GetIPString());
-
- // XXX: we should probably hook cloaked hosts in here somehow too..
- rv = banmatch_reduce(rv, this->GetExtBanStatus(mask, type));
- rv = banmatch_reduce(rv, this->GetExtBanStatus(user->GetFullHost(), type));
- rv = banmatch_reduce(rv, this->GetExtBanStatus(user->GetFullRealHost(), type));
- return rv;
-}
-
-/* Channel::PartUser
- * remove a channel from a users record, and return the number of users left.
- * Therefore, if this function returns 0 the caller should delete the Channel.
- */
-long Channel::PartUser(User *user, std::string &reason)
-{
- bool silent = false;
-
- if (!user)
- return this->GetUserCounter();
-
- UCListIter i = user->chans.find(this);
- if (i != user->chans.end())
- {
- FOREACH_MOD(I_OnUserPart,OnUserPart(user, this, reason, silent));
-
- if (!silent)
- this->WriteChannel(user, "PART %s%s%s", this->name.c_str(), reason.empty() ? "" : " :", reason.c_str());