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

authproc: minor fixes

This commit is contained in:
Elizabeth Myers 2016-04-02 20:31:32 -05:00
parent 8d48aa190b
commit e2a8228f85

View file

@ -222,27 +222,27 @@ cmd_reject_client(int parc, char **parv)
static void
cmd_oper_warn(int parc, char **parv)
{
switch(*parv[2])
switch(*parv[1])
{
case 'D': /* Debug */
sendto_realops_snomask(SNO_DEBUG, L_ALL, "authd debug: %s", parv[3]);
idebug("authd: %s", parv[3]);
sendto_realops_snomask(SNO_DEBUG, L_ALL, "authd debug: %s", parv[2]);
idebug("authd: %s", parv[2]);
break;
case 'I': /* Info */
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd info: %s", parv[3]);
inotice("authd: %s", parv[3]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd info: %s", parv[2]);
inotice("authd: %s", parv[2]);
break;
case 'W': /* Warning */
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd WARNING: %s", parv[3]);
iwarn("authd: %s", parv[3]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd WARNING: %s", parv[2]);
iwarn("authd: %s", parv[2]);
break;
case 'C': /* Critical (error) */
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd CRITICAL: %s", parv[3]);
ierror("authd: %s", parv[3]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd CRITICAL: %s", parv[2]);
ierror("authd: %s", parv[2]);
break;
default: /* idk */
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd sent us an unknown oper notice type (%s): %s", parv[2], parv[3]);
ilog(L_MAIN, "authd unknown oper notice type (%s): %s", parv[2], parv[3]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd sent us an unknown oper notice type (%s): %s", parv[1], parv[2]);
ilog(L_MAIN, "authd unknown oper notice type (%s): %s", parv[1], parv[2]);
break;
}
}
@ -345,6 +345,7 @@ restart_authd_cb(rb_helper * helper)
}
start_authd();
configure_authd();
rehash(false); /* FIXME - needed to reload authd configuration */
}
@ -358,7 +359,6 @@ void
rehash_authd(void)
{
rb_helper_write(authd_helper, "R");
configure_authd();
}
void
@ -540,7 +540,7 @@ add_blacklist(const char *host, const char *reason, uint8_t iptype, rb_dlink_lis
void
del_blacklist(const char *host)
{
rb_dictionary_delete(bl_stats, host);
rb_free(rb_dictionary_delete(bl_stats, host));
rb_helper_write(authd_helper, "O rbl_del %s", host);
}