-
- virtual int OnCheckInvite(User* user, Channel* chan)
- {
- if(chan != NULL)
- {
- modelist* list;
- chan->GetExt(ie->GetInfoKey(), list);
- if (list)
- {
- std::string mask = std::string(user->nick) + "!" + user->ident + "@" + user->GetIPString();
- for (modelist::iterator it = list->begin(); it != list->end(); it++)
- {
- if(match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (match(mask, it->mask, true)))
- {
- // They match an entry on the list, so let them in.
- return 1;
- }
- }
- }
- // or if there wasn't a list, there can't be anyone on it, so we don't need to do anything.
- }