- char mask[MAXBUF];
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnCheckBan,OnCheckBan(user, this));
-
- if (MOD_RESULT == -1)
- return true;
- else if (MOD_RESULT == 0)
- {
- snprintf(mask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), user->GetIPString());
- for (BanList::iterator i = this->bans.begin(); i != this->bans.end(); i++)
- {
- if ((InspIRCd::Match(user->GetFullHost(),i->data, NULL)) || // host
- (InspIRCd::Match(user->GetFullRealHost(),i->data, NULL)) || // uncloaked host
- (InspIRCd::MatchCIDR(mask, i->data, NULL))) // ip
- {
- return true;
- }
- }
- }
- return false;
-}
+ ModResult result;
+ FIRST_MOD_RESULT(OnCheckChannelBan, result, (user, this));