unsigned long delay_exit_length(void);
int throttle_add(struct sockaddr *addr);
+unsigned long throttle_size(void);
#endif
unsigned int is_asuc; /* successful auth requests */
unsigned int is_abad; /* bad auth requests */
unsigned int is_rej; /* rejected from cache */
+ unsigned int is_thr; /* number of throttled connections */
unsigned int is_ssuc; /* successful sasl authentications */
unsigned int is_sbad; /* failed sasl authentications */
unsigned int is_tgch; /* messages blocked due to target change */
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :rejected %u delaying %lu",
sp.is_rej, delay_exit_length());
+ sendto_one_numeric(source_p, RPL_STATSDEBUG,
+ "T :throttled refused %u throttle list size %lu", sp.is_thr, throttle_size());
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :nicks being delayed %lu",
get_nd_count());
rb_event_add("throttle_expires", throttle_expires, NULL, 10);
}
+unsigned long
+throttle_size(void)
+{
+ return rb_dlink_list_length(&throttle_list);
+}
void
add_reject(struct Client *client_p, const char *mask1, const char *mask2)
t = pnode->data;
if(t->count > ConfigFileEntry.throttle_count)
- return 1;
-
+ {
+ ServerStats.is_thr++;
+ return 1;
+ }
/* Stop penalizing them after they've been throttled */
t->last = rb_current_time();
t->count++;