{
/* This allows CIDR ban matching
*
- * Full masked host Full unmasked host IP with CIDR IP without CIDR
+ * Full masked host Full unmasked host IP with/without CIDR
*/
- if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)) || (match(mask, i->data, false)))
+ if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)))
{
WriteServ(user->fd,"474 %s %s :Cannot join channel (You're banned)",user->nick, Ptr->name);
return NULL;
if ((glines.empty()) && (pglines.empty()))
return NULL;
for (std::vector<GLine>::iterator i = glines.begin(); i != glines.end(); i++)
- if (match(host,i->hostmask))
+ if (match(host,i->hostmask, true))
return i->reason;
for (std::vector<GLine>::iterator i = pglines.begin(); i != pglines.end(); i++)
- if (match(host,i->hostmask))
+ if (match(host,i->hostmask, true))
return i->reason;
return NULL;
}
char host2[MAXBUF];
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)))
+ 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)))
+ if ((match(host,i->hostmask)) || (match(host2,i->hostmask, true)))
return i->reason;
return NULL;
}
if ((zlines.empty()) && (pzlines.empty()))
return NULL;
for (std::vector<ZLine>::iterator i = zlines.begin(); i != zlines.end(); i++)
- if (match(ipaddr,i->ipaddr,true))
+ if (match(ipaddr,i->ipaddr, true))
return i->reason;
for (std::vector<ZLine>::iterator i = pzlines.begin(); i != pzlines.end(); i++)
- if (match(ipaddr,i->ipaddr,true))
+ if (match(ipaddr,i->ipaddr, true))
return i->reason;
return NULL;
}
if ((klines.empty()) && (pklines.empty()))
return NULL;
for (std::vector<KLine>::iterator i = klines.begin(); i != klines.end(); i++)
- if (match(host,i->hostmask))
+ if (match(host,i->hostmask, true))
return i->reason;
for (std::vector<KLine>::iterator i = pklines.begin(); i != pklines.end(); i++)
- if (match(host,i->hostmask))
+ if (match(host,i->hostmask, true))
return i->reason;
return NULL;
}