- // XXX: send a numeric here
- user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Cannot join " + c->name + ", as you match a ban");
- return 1;
+ rm = mask.substr(3);
+ status = mh->GetModeChar();
+ }
+ for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
+ {
+ if (InspIRCd::Match((**i).name, rm))
+ {
+ if (status)
+ {
+ Membership* memb = c->GetUser(user);
+ if (memb->hasMode(status))
+ return MOD_RES_DENY;
+ }
+ else
+ return MOD_RES_DENY;
+ }