throttle_duration = 60;
throttle_count = 4;
max_ratelimit_tokens = 30;
+ away_interval = 30;
};
modules {
* you're doing.
*/
max_ratelimit_tokens = 30;
+
+ /* away_interval: the minimum interval between AWAY commands. One
+ * additional AWAY command is allowed, and only marking as away
+ * counts.
+ */
+ away_interval = 30;
};
modules {
struct DNSQuery *dnsquery; /* for outgoing server's name lookup */
- time_t last_away; /* Away since... */
+ time_t next_away; /* Don't allow next away before... */
time_t last;
/* clients allowed to talk through +g */
int operspy_dont_care_user_info;
int use_propagated_bans;
int max_ratelimit_tokens;
+ int away_interval;
int client_flood_max_lines;
int client_flood_burst_rate;
#include "s_serv.h"
#include "packet.h"
-
static int m_away(struct Client *, struct Client *, int, const char **);
struct Message away_msgtab = {
return 0;
}
+ /* Rate limit this because it is sent to common channels. */
+ if(!IsOper(source_p) &&
+ source_p->localClient->next_away > rb_current_time())
+ {
+ sendto_one(source_p, form_str(RPL_LOAD2HI),
+ me.name, source_p->name, "AWAY");
+ return;
+ }
+ if(source_p->localClient->next_away < rb_current_time() -
+ ConfigFileEntry.away_interval)
+ source_p->localClient->next_away = rb_current_time();
+ else
+ source_p->localClient->next_away = rb_current_time() +
+ ConfigFileEntry.away_interval;
+
if(source_p->user->away == NULL)
allocate_away(source_p);
if(strncmp(source_p->user->away, parv[1], AWAYLEN - 1))
&ConfigFileEntry.max_ratelimit_tokens,
"The maximum number of tokens that can be accumulated for executing rate-limited commands",
},
+ {
+ "away_interval",
+ OUTPUT_DECIMAL,
+ &ConfigFileEntry.away_interval,
+ "The minimum time between aways",
+ },
{
"default_split_server_count",
OUTPUT_DECIMAL,
{ "client_flood_message_num", CF_INT, NULL, 0, &ConfigFileEntry.client_flood_message_num },
{ "client_flood_message_time", CF_INT, NULL, 0, &ConfigFileEntry.client_flood_message_time },
{ "max_ratelimit_tokens", CF_INT, NULL, 0, &ConfigFileEntry.max_ratelimit_tokens },
+ { "away_interval", CF_INT, NULL, 0, &ConfigFileEntry.away_interval },
{ "\0", 0, NULL, 0, NULL }
};
ConfigFileEntry.operspy_dont_care_user_info = NO;
ConfigFileEntry.use_propagated_bans = YES;
ConfigFileEntry.max_ratelimit_tokens = 30;
+ ConfigFileEntry.away_interval = 30;
#ifdef HAVE_LIBZ
ConfigFileEntry.compression_level = 4;