/* Pick up the visible username. If a sethost username is set, the real
* username is not checked. */
ident=np->ident;
/* Pick up the visible username. If a sethost username is set, the real
* username is not checked. */
ident=np->ident;
+
+ /* "visibleonly" means don't check IP/realhost if they are sethosted/+x.
+ * We change this to mean "Don't check IP/realhost unconditionally" - by
+ * clearing it to 0 if the user isn't sethosted or +x. Simplifies logic
+ * later. */
+
+ if (!(IsSetHost(np) || (IsAccount(np) && IsHideHost(np)))
+ visibleonly=0;
if (ipmask_check(&(np->ipnode->prefix->sin), &(bp->ipaddr), bp->prefixlen))
return 1;
}
/* Hostname bans need to be checked against +x host, +h host (if set)
* and actual host. Note that the +x host is only generated (and checked) if it's
if (ipmask_check(&(np->ipnode->prefix->sin), &(bp->ipaddr), bp->prefixlen))
return 1;
}
/* Hostname bans need to be checked against +x host, +h host (if set)
* and actual host. Note that the +x host is only generated (and checked) if it's
if ((bp->flags & CHANBAN_HIDDENHOST) && IsAccount(np)) {
sprintf(fakehost,"%s.%s",np->authname, HIS_HIDDENHOST);
if ((bp->flags & CHANBAN_HIDDENHOST) && IsAccount(np)) {
sprintf(fakehost,"%s.%s",np->authname, HIS_HIDDENHOST);
/* If we are only checking visible host and the host is somehow masked, don't check
* against the real one. */
/* If we are only checking visible host and the host is somehow masked, don't check
* against the real one. */