0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

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

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);