Initial attempt at the conndelay hack
This commit is contained in:
parent
ef62a62f62
commit
2d6562846f
4 changed files with 14 additions and 0 deletions
|
@ -215,6 +215,7 @@ struct config_file_entry
|
||||||
int tkline_expire_notices;
|
int tkline_expire_notices;
|
||||||
int use_whois_actually;
|
int use_whois_actually;
|
||||||
int disable_auth;
|
int disable_auth;
|
||||||
|
int connect_delay;
|
||||||
int connect_timeout;
|
int connect_timeout;
|
||||||
int burst_away;
|
int burst_away;
|
||||||
int reject_ban_time;
|
int reject_ban_time;
|
||||||
|
|
|
@ -2748,6 +2748,7 @@ static struct ConfEntry conf_general_table[] =
|
||||||
{ "client_exit", CF_YESNO, NULL, 0, &ConfigFileEntry.client_exit },
|
{ "client_exit", CF_YESNO, NULL, 0, &ConfigFileEntry.client_exit },
|
||||||
{ "collision_fnc", CF_YESNO, NULL, 0, &ConfigFileEntry.collision_fnc },
|
{ "collision_fnc", CF_YESNO, NULL, 0, &ConfigFileEntry.collision_fnc },
|
||||||
{ "resv_fnc", CF_YESNO, NULL, 0, &ConfigFileEntry.resv_fnc },
|
{ "resv_fnc", CF_YESNO, NULL, 0, &ConfigFileEntry.resv_fnc },
|
||||||
|
{ "connect_delay", CF_TIME, NULL, 0, &ConfigFileEntry.connect_delay },
|
||||||
{ "connect_timeout", CF_TIME, NULL, 0, &ConfigFileEntry.connect_timeout },
|
{ "connect_timeout", CF_TIME, NULL, 0, &ConfigFileEntry.connect_timeout },
|
||||||
{ "default_floodcount", CF_INT, NULL, 0, &ConfigFileEntry.default_floodcount },
|
{ "default_floodcount", CF_INT, NULL, 0, &ConfigFileEntry.default_floodcount },
|
||||||
{ "default_ident_timeout", CF_INT, NULL, 0, &ConfigFileEntry.default_ident_timeout },
|
{ "default_ident_timeout", CF_INT, NULL, 0, &ConfigFileEntry.default_ident_timeout },
|
||||||
|
|
|
@ -133,6 +133,12 @@ parse_client_queued(struct Client *client_p)
|
||||||
if(client_p->localClient->sent_parsed >= allow_read)
|
if(client_p->localClient->sent_parsed >= allow_read)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* connect_delay hack. Don't process any messages from a new client for $n seconds,
|
||||||
|
* to allow network bots to do their thing before channels can be joined.
|
||||||
|
*/
|
||||||
|
if (rb_current_time() < client_p->localClient->firsttime + ConfigFileEntry.connect_delay)
|
||||||
|
break;
|
||||||
|
|
||||||
dolen = rb_linebuf_get(&client_p->localClient->
|
dolen = rb_linebuf_get(&client_p->localClient->
|
||||||
buf_recvq, readBuf, READBUF_SIZE,
|
buf_recvq, readBuf, READBUF_SIZE,
|
||||||
LINEBUF_COMPLETE, LINEBUF_PARSED);
|
LINEBUF_COMPLETE, LINEBUF_PARSED);
|
||||||
|
|
|
@ -151,6 +151,12 @@ static struct InfoStruct info_table[] = {
|
||||||
&ConfigFileEntry.client_flood_message_time,
|
&ConfigFileEntry.client_flood_message_time,
|
||||||
"Time to allow per client_flood_message_num outside of burst",
|
"Time to allow per client_flood_message_num outside of burst",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"connect_delay",
|
||||||
|
OUTPUT_DECIMAL,
|
||||||
|
&ConfigFileEntry.connect_delay,
|
||||||
|
"Time to wait before processing commands from a new client",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"connect_timeout",
|
"connect_timeout",
|
||||||
OUTPUT_DECIMAL,
|
OUTPUT_DECIMAL,
|
||||||
|
|
Loading…
Reference in a new issue