summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
5bc296c)
dots and wildcards any more.
return 0;
if (bp->flags & CHANBAN_HOSTEXACT) {
return 0;
if (bp->flags & CHANBAN_HOSTEXACT) {
- /* If it's an exact IP ban we can compare it numerically */
+ /* Only exact IP bans are valid */
unsigned int cip;
unsigned char *ch;
unsigned int cip;
unsigned char *ch;
if (cip==bp->ipaddr)
return 1;
if (cip==bp->ipaddr)
return 1;
- } else {
- /* It's not an exact IP ban so let's generate the string */
- ipstring=IPtostr(np->p_ipaddr);
-
- if (bp->flags & CHANBAN_HOSTMASK && match2strings(bp->host->content,ipstring))
- return 1;
}
} else {
/* Hostname bans need to be checked against +x host, +h host (if set)
}
} else {
/* Hostname bans need to be checked against +x host, +h host (if set)
if (bp->flags & CHANBAN_IP) {
if (bp->flags & CHANBAN_HOSTEXACT) {
if (bp->flags & CHANBAN_IP) {
if (bp->flags & CHANBAN_HOSTEXACT) {
- /* If it's an exact IP ban we can compare it numerically */
+ /* Only exact matches for IP bans */
unsigned int cip;
unsigned char *ch;
unsigned int cip;
unsigned char *ch;
if (cip==bp->ipaddr)
return 1;
if (cip==bp->ipaddr)
return 1;
- } else {
- /* It's not an exact IP ban so let's generate the string */
- ipstring=IPtostr(np->p_ipaddr);
-
- if (bp->flags & CHANBAN_HOSTMASK && match2strings(bp->host->content,ipstring))
- return 1;
}
} else {
/* Hostname bans need to be checked against +x host, +h host (if set)
}
} else {
/* Hostname bans need to be checked against +x host, +h host (if set)