mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 06:51:08 +01:00
Relocate report_Klines to proper home
This function is not used anywhere else but m_stats, so should be put there.
This commit is contained in:
parent
61815bf932
commit
34c10ca8b7
3 changed files with 37 additions and 37 deletions
|
@ -58,7 +58,6 @@ struct ConfItem *find_dline(struct sockaddr *, int);
|
||||||
(struct sockaddr *)&(x)->localClient->ip, CONF_KILL,\
|
(struct sockaddr *)&(x)->localClient->ip, CONF_KILL,\
|
||||||
(x)->localClient->ip.ss_family, (x)->username, NULL))
|
(x)->localClient->ip.ss_family, (x)->username, NULL))
|
||||||
|
|
||||||
void report_Klines(struct Client *);
|
|
||||||
void report_auth(struct Client *);
|
void report_auth(struct Client *);
|
||||||
#ifdef RB_IPV6
|
#ifdef RB_IPV6
|
||||||
int match_ipv6(struct sockaddr *, struct sockaddr *, int);
|
int match_ipv6(struct sockaddr *, struct sockaddr *, int);
|
||||||
|
|
|
@ -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
|
static void
|
||||||
stats_klines(struct Client *source_p)
|
stats_klines(struct Client *source_p)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 : "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue