Remove idle time checking (auto disconnecting users idle too long).

This commit is contained in:
Jilles Tjoelker 2008-01-01 23:04:34 +01:00
parent 7c3a2f7081
commit e54995b150
13 changed files with 0 additions and 93 deletions

View File

@ -425,7 +425,6 @@ general {
glines = no;
gline_time = 1 day;
gline_min_cidr = 16;
idletime = 0;
max_targets = 4;
client_flood = 20;
use_whois_actually = no;

View File

@ -1026,11 +1026,6 @@ general {
*/
gline_min_cidr = 16;
/* idletime: the maximum amount of time a user may idle before
* they are disconnected
*/
idletime = 0;
/* REMOVE ME. The following line checks you've been reading. */
havent_read_conf = yes;

View File

@ -10,8 +10,6 @@ SET <option> <value>
Note that this variable is used for both
channels and clients
IDENTTIMEOUT- Timeout for requesting ident from a client
IDLETIME - The number of seconds a client can be idle
before disconnecting them
MAX - Sets the number of max connections
to <value>. (This number cannot exceed
HARD_FDLIMIT in config.h)

View File

@ -459,7 +459,6 @@ struct exit_client_hook
#define FLAGS2_EXEMPTKLINE 0x01000000
#define FLAGS2_EXEMPTFLOOD 0x02000000
#define FLAGS2_NOLIMIT 0x04000000
#define FLAGS2_IDLE_LINED 0x08000000
#define FLAGS2_IP_SPOOFING 0x10000000
#define FLAGS2_EXEMPTSPAMBOT 0x20000000
#define FLAGS2_EXEMPTSHIDE 0x40000000
@ -557,9 +556,6 @@ struct exit_client_hook
#define IsIPSpoof(x) ((x)->flags2 & FLAGS2_IP_SPOOFING)
#define SetIPSpoof(x) ((x)->flags2 |= FLAGS2_IP_SPOOFING)
#define SetIdlelined(x) ((x)->flags2 |= FLAGS2_IDLE_LINED)
#define IsIdlelined(x) ((x)->flags2 & FLAGS2_IDLE_LINED)
/* for local users: flood grace period is over
* for servers: mentioned in networknotice.c notice
*/

View File

@ -39,8 +39,6 @@ struct SetOptions
int maxclients; /* max clients allowed */
int autoconn; /* autoconn enabled for all servers? */
int idletime;
int floodcount; /* Number of messages in 1 second */
int ident_timeout; /* timeout for identd lookups */

View File

@ -95,7 +95,6 @@ struct ConfItem
#define CONF_FLAGS_NEED_IDENTD 0x00000008
#define CONF_FLAGS_EXEMPTKLINE 0x00000040
#define CONF_FLAGS_NOLIMIT 0x00000080
#define CONF_FLAGS_IDLE_LINED 0x00000100
#define CONF_FLAGS_SPOOF_IP 0x00000200
#define CONF_FLAGS_SPOOF_NOTICE 0x00000400
#define CONF_FLAGS_REDIR 0x00000800
@ -128,7 +127,6 @@ struct ConfItem
#define IsConfExemptShide(x) ((x)->flags & CONF_FLAGS_EXEMPTSHIDE)
#define IsConfExemptJupe(x) ((x)->flags & CONF_FLAGS_EXEMPTJUPE)
#define IsConfExemptResv(x) ((x)->flags & CONF_FLAGS_EXEMPTRESV)
#define IsConfIdlelined(x) ((x)->flags & CONF_FLAGS_IDLE_LINED)
#define IsConfDoSpoofIp(x) ((x)->flags & CONF_FLAGS_SPOOF_IP)
#define IsConfSpoofNotice(x) ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
#define IsConfEncrypted(x) ((x)->flags & CONF_FLAGS_ENCRYPTED)
@ -207,7 +205,6 @@ struct config_file_entry
int gline_time;
int gline_min_cidr;
int gline_min_cidr6;
int idletime;
int hide_server;
int hide_spoof_ips;
int hide_error_messages;

View File

@ -285,12 +285,6 @@ static struct InfoStruct info_table[] = {
&ServerInfo.hub,
"Server is a hub"
},
{
"idletime",
OUTPUT_DECIMAL,
&ConfigFileEntry.idletime,
"Number of minutes before a client is considered idle"
},
{
"kline_delay",
OUTPUT_DECIMAL,

View File

@ -72,7 +72,6 @@ static void quote_autoconn(struct Client *, char *, int);
static void quote_autoconnall(struct Client *, int);
static void quote_floodcount(struct Client *, int);
static void quote_identtimeout(struct Client *, int);
static void quote_idletime(struct Client *, int);
static void quote_max(struct Client *, int);
static void quote_operstring(struct Client *, const char *);
static void quote_spamnum(struct Client *, int);
@ -99,7 +98,6 @@ static struct SetStruct set_cmd_table[] = {
{"AUTOCONNALL", quote_autoconnall, 0, 1 },
{"FLOODCOUNT", quote_floodcount, 0, 1 },
{"IDENTTIMEOUT", quote_identtimeout, 0, 1 },
{"IDLETIME", quote_idletime, 0, 1 },
{"MAX", quote_max, 0, 1 },
{"MAXCLIENTS", quote_max, 0, 1 },
{"OPERSTRING", quote_operstring, 1, 0 },
@ -213,33 +211,6 @@ quote_identtimeout(struct Client *source_p, int newval)
GlobalSetOptions.ident_timeout);
}
/* SET IDLETIME */
static void
quote_idletime(struct Client *source_p, int newval)
{
if(newval >= 0)
{
if(newval == 0)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s has disabled idletime checking", source_p->name);
GlobalSetOptions.idletime = 0;
}
else
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s has changed IDLETIME to %i",
source_p->name, newval);
GlobalSetOptions.idletime = (newval * 60);
}
}
else
{
sendto_one_notice(source_p, ":IDLETIME is currently %i",
GlobalSetOptions.idletime / 60);
}
}
/* SET MAX */
static void
quote_max(struct Client *source_p, int newval)

View File

@ -307,34 +307,6 @@ check_pings_list(dlink_list * list)
if(!MyConnect(client_p) || IsDead(client_p))
continue;
if(IsPerson(client_p))
{
if(!IsExemptKline(client_p) &&
GlobalSetOptions.idletime &&
!IsOper(client_p) &&
!IsIdlelined(client_p) &&
((CurrentTime - client_p->localClient->last) > GlobalSetOptions.idletime))
{
struct ConfItem *aconf;
aconf = make_conf();
aconf->status = CONF_KILL;
DupString(aconf->host, client_p->host);
DupString(aconf->passwd, "idle exceeder");
DupString(aconf->user, client_p->username);
aconf->port = 0;
aconf->hold = CurrentTime + 60;
add_temp_kline(aconf);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Idle time limit exceeded for %s - temp k-lining",
get_client_name(client_p, HIDE_IP));
exit_client(client_p, client_p, &me, aconf->passwd);
continue;
}
}
ping = get_client_ping(client_p);
if(ping < (CurrentTime - client_p->localClient->lasttime))

View File

@ -692,8 +692,6 @@ show_iline_prefix(struct Client *sptr, struct ConfItem *aconf, char *name)
*prefix_ptr++ = '^';
if(IsOper(sptr) && IsConfExemptLimits(aconf))
*prefix_ptr++ = '>';
if(IsOper(sptr) && IsConfIdlelined(aconf))
*prefix_ptr++ = '<';
*prefix_ptr = '\0';
strncpy(prefix_ptr, name, USERLEN);
return (prefix_of_host);

View File

@ -2019,7 +2019,6 @@ static struct ConfEntry conf_general_table[] =
{ "gline_min_cidr6", CF_INT, NULL, 0, &ConfigFileEntry.gline_min_cidr6 },
{ "gline_time", CF_TIME, NULL, 0, &ConfigFileEntry.gline_time },
{ "global_snotices", CF_YESNO, NULL, 0, &ConfigFileEntry.global_snotices },
{ "idletime", CF_TIME, NULL, 0, &ConfigFileEntry.idletime },
{ "hide_spoof_ips", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_spoof_ips },
{ "dline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.dline_with_reason },
{ "kline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.kline_with_reason },

View File

@ -793,7 +793,6 @@ set_default_conf(void)
ConfigFileEntry.gline_min_cidr6 = 48;
ConfigFileEntry.hide_spoof_ips = YES;
ConfigFileEntry.hide_error_messages = 1;
ConfigFileEntry.idletime = 0;
ConfigFileEntry.dots_in_ident = 0;
ConfigFileEntry.max_targets = MAX_TARGETS_DEFAULT;
DupString(ConfigFileEntry.servlink_path, SLPATH);
@ -894,8 +893,6 @@ validate_conf(void)
(ConfigFileEntry.client_flood > CLIENT_FLOOD_MAX))
ConfigFileEntry.client_flood = CLIENT_FLOOD_MAX;
GlobalSetOptions.idletime = (ConfigFileEntry.idletime * 60);
if(!split_users || !split_servers ||
(!ConfigChannel.no_create_on_split && !ConfigChannel.no_join_on_split))
{

View File

@ -835,13 +835,6 @@ report_and_set_user_flags(struct Client *source_p, struct ConfItem *aconf)
sendto_one_notice(source_p, "*** You are exempt from user limits. congrats.");
}
/* If this user is exempt from idle time outs */
if(IsConfIdlelined(aconf))
{
SetIdlelined(source_p);
sendto_one_notice(source_p, ":*** You are exempt from idle limits. congrats.");
}
if(IsConfExemptFlood(aconf))
{
SetExemptFlood(source_p);