Show some target change statistics in /stats t.
- the number of messages blocked by target change on this server since it was started - the number of IPs currently subject to a a lower target limit on this server (these expire over time)
This commit is contained in:
parent
3b0e68bf5e
commit
26f754d989
|
@ -71,6 +71,7 @@ struct ServerStatistics
|
||||||
unsigned int is_rej; /* rejected from cache */
|
unsigned int is_rej; /* rejected from cache */
|
||||||
unsigned int is_ssuc; /* successful sasl authentications */
|
unsigned int is_ssuc; /* successful sasl authentications */
|
||||||
unsigned int is_sbad; /* failed sasl authentications */
|
unsigned int is_sbad; /* failed sasl authentications */
|
||||||
|
unsigned int is_tgch; /* messages blocked due to target change */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct ServerStatistics *ServerStats;
|
extern struct ServerStatistics *ServerStats;
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "patricia.h"
|
#include "patricia.h"
|
||||||
#include "s_newconf.h"
|
#include "s_newconf.h"
|
||||||
|
#include "s_stats.h"
|
||||||
|
|
||||||
static int m_message(int, const char *, struct Client *, struct Client *, int, const char **);
|
static int m_message(int, const char *, struct Client *, struct Client *, int, const char **);
|
||||||
static int m_privmsg(struct Client *, struct Client *, int, const char **);
|
static int m_privmsg(struct Client *, struct Client *, int, const char **);
|
||||||
|
@ -609,6 +610,7 @@ add_target(struct Client *source_p, struct Client *target_p)
|
||||||
/* cant clear any, full target list */
|
/* cant clear any, full target list */
|
||||||
else if(USED_TARGETS(source_p) == 10)
|
else if(USED_TARGETS(source_p) == 10)
|
||||||
{
|
{
|
||||||
|
ServerStats->is_tgch++;
|
||||||
add_tgchange(source_p->sockhost);
|
add_tgchange(source_p->sockhost);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,9 @@ tstats(struct Client *source_p)
|
||||||
sp->is_wrdi, sp->is_empt);
|
sp->is_wrdi, sp->is_empt);
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"T :numerics seen %u", sp->is_num);
|
"T :numerics seen %u", sp->is_num);
|
||||||
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
|
"T :tgchange blocked msgs %u restricted addrs %u",
|
||||||
|
sp->is_tgch, dlink_list_length(&tgchange_list));
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"T :auth successes %u fails %u",
|
"T :auth successes %u fails %u",
|
||||||
sp->is_asuc, sp->is_abad);
|
sp->is_asuc, sp->is_abad);
|
||||||
|
|
Loading…
Reference in New Issue