diff --git a/include/s_stats.h b/include/s_stats.h index 1fe7afa..562e77c 100644 --- a/include/s_stats.h +++ b/include/s_stats.h @@ -71,6 +71,7 @@ struct ServerStatistics unsigned int is_rej; /* rejected from cache */ unsigned int is_ssuc; /* successful sasl authentications */ unsigned int is_sbad; /* failed sasl authentications */ + unsigned int is_tgch; /* messages blocked due to target change */ }; extern struct ServerStatistics *ServerStats; diff --git a/modules/core/m_message.c b/modules/core/m_message.c index 5ec761e..21c93af 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -44,6 +44,7 @@ #include "event.h" #include "patricia.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_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 */ else if(USED_TARGETS(source_p) == 10) { + ServerStats->is_tgch++; add_tgchange(source_p->sockhost); return 0; } diff --git a/src/s_stats.c b/src/s_stats.c index 8efde15..e998ce4 100644 --- a/src/s_stats.c +++ b/src/s_stats.c @@ -139,6 +139,9 @@ tstats(struct Client *source_p) sp->is_wrdi, sp->is_empt); sendto_one_numeric(source_p, RPL_STATSDEBUG, "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, "T :auth successes %u fails %u", sp->is_asuc, sp->is_abad);