Slightly tighten auth{} duplicate check:

If the existing auth{} block has no auth_user, it will
trump any auth{} block for the same u@h.
This commit is contained in:
Jilles Tjoelker 2010-01-31 01:40:43 +01:00
parent 3d1f32c07a
commit 5f2df25109
1 changed files with 1 additions and 2 deletions

View File

@ -913,8 +913,7 @@ conf_end_auth(struct TopConf *tc)
if ((found_conf = find_exact_conf_by_address("*", CONF_CLIENT, "*")) && found_conf->spasswd == NULL)
conf_report_error("Ignoring redundant auth block (after *@*)");
else if ((found_conf = find_exact_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user)) &&
( (!found_conf->spasswd && !yy_aconf->spasswd) ||
(found_conf->spasswd && yy_aconf->spasswd &&
(!found_conf->spasswd || (yy_aconf->spasswd &&
0 == irccmp(found_conf->spasswd, yy_aconf->spasswd))))
conf_report_error("Ignoring duplicate auth block for %s@%s",
yy_aconf->user, yy_aconf->host);