- snprintf(host2,MAXBUF,"*@%s",host);
- for (std::vector<ELine>::iterator i = elines.begin(); i != elines.end(); i++)
- if ((match(host,i->hostmask)) || (match(host2,i->hostmask, true)))
- return i->reason;
- for (std::vector<ELine>::iterator i = pelines.begin(); i != pelines.end(); i++)
- if ((match(host,i->hostmask)) || (match(host2,i->hostmask, true)))
- return i->reason;
+ snprintf(host2,MAXBUF,"*@%s",user->host);
+ for (std::vector<ELine*>::iterator i = elines.begin(); i != elines.end(); i++)
+ {
+ if ((match(user->ident,(*i)->identmask)))
+ {
+ if ((match(user->host,(*i)->hostmask, true)) || (match(user->GetIPString(),(*i)->hostmask, true)))
+ {
+ return (*i);
+ }
+ }
+ }
+ for (std::vector<ELine*>::iterator i = pelines.begin(); i != pelines.end(); i++)
+ {
+ if ((match(user->ident,(*i)->identmask)))
+ {
+ if ((match(user->host,(*i)->hostmask, true)) || (match(user->GetIPString(),(*i)->hostmask, true)))
+ {
+ return (*i);
+ }
+ }
+ }