diff --git a/include/hostmask.h b/include/hostmask.h index 4a265aa6f..b05df58ff 100644 --- a/include/hostmask.h +++ b/include/hostmask.h @@ -58,7 +58,6 @@ struct ConfItem *find_dline(struct sockaddr *, int); (struct sockaddr *)&(x)->localClient->ip, CONF_KILL,\ (x)->localClient->ip.ss_family, (x)->username, NULL)) -void report_Klines(struct Client *); void report_auth(struct Client *); #ifdef RB_IPV6 int match_ipv6(struct sockaddr *, struct sockaddr *, int); diff --git a/modules/m_stats.c b/modules/m_stats.c index 44c2e15c5..ed8d0077f 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -621,6 +621,43 @@ stats_tklines(struct Client *source_p) } } +/* report_Klines() + * + * inputs - Client to report to, mask + * outputs - + * side effects - Reports configured K-lines to client_p. + */ +static void +report_Klines(struct Client *source_p) +{ + char *host, *pass, *user, *oper_reason; + struct AddressRec *arec; + struct ConfItem *aconf = NULL; + int i; + + for (i = 0; i < ATABLE_SIZE; i++) + { + for (arec = atable[i]; arec; arec = arec->next) + { + if(arec->type == CONF_KILL) + { + aconf = arec->aconf; + + /* its a tempkline, theyre reported elsewhere */ + if(aconf->flags & CONF_FLAGS_TEMPORARY) + continue; + + get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason); + sendto_one_numeric(source_p, RPL_STATSKLINE, + form_str(RPL_STATSKLINE), + 'K', host, user, pass, + oper_reason ? "|" : "", + oper_reason ? oper_reason : ""); + } + } + } +} + static void stats_klines(struct Client *source_p) { diff --git a/src/hostmask.c b/src/hostmask.c index 864cbf936..3c7da5f50 100644 --- a/src/hostmask.c +++ b/src/hostmask.c @@ -770,39 +770,3 @@ report_auth(struct Client *client_p) } } -/* report_Klines() - * - * inputs - Client to report to, mask - * outputs - - * side effects - Reports configured K-lines to client_p. - */ -void -report_Klines(struct Client *source_p) -{ - char *host, *pass, *user, *oper_reason; - struct AddressRec *arec; - struct ConfItem *aconf = NULL; - int i; - - for (i = 0; i < ATABLE_SIZE; i++) - { - for (arec = atable[i]; arec; arec = arec->next) - { - if(arec->type == CONF_KILL) - { - aconf = arec->aconf; - - /* its a tempkline, theyre reported elsewhere */ - if(aconf->flags & CONF_FLAGS_TEMPORARY) - continue; - - get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason); - sendto_one_numeric(source_p, RPL_STATSKLINE, - form_str(RPL_STATSKLINE), - 'K', host, user, pass, - oper_reason ? "|" : "", - oper_reason ? oper_reason : ""); - } - } - } -}