Change kicknorejoin to be hardcoded to 2 seconds instead of a

configurable opton.
This commit is contained in:
JD Horelick 2010-05-21 04:20:45 -04:00
parent f0e0e5672d
commit 1add004b97
8 changed files with 9 additions and 18 deletions

8
NEWS
View File

@ -1,6 +1,12 @@
This is ShadowIRCd 6.1, Copyright (c) 2005-2010 ShadowIRCd team. This is ShadowIRCd 6.2, Copyright (c) 2005-2010 ShadowIRCd team.
See LICENSE for licensing details (GPL v2). See LICENSE for licensing details (GPL v2).
-- shadowircd-6.2.0
other changes
- change kicknorejoin to not be a config option and be hardcoded to 2 seconds
because a longer time is kind of pointless.
-- shadowircd-6.1.0 -- shadowircd-6.1.0
new configuration options new configuration options

View File

@ -396,7 +396,6 @@ channel {
cycle_host_change = yes; cycle_host_change = yes;
host_in_topic = yes; host_in_topic = yes;
resv_forcepart = yes; resv_forcepart = yes;
kick_no_rejoin_time = 30 seconds;
}; };
serverhide { serverhide {

View File

@ -892,11 +892,6 @@ channel {
* when a RESV is issued. * when a RESV is issued.
*/ */
resv_forcepart = yes; resv_forcepart = yes;
/* kick_no_rejoin_time: the amount of time that a user cannot
* rejoin for after being kicked out of a +J channel.
*/
kick_no_rejoin_time = 30 seconds;
}; };

View File

@ -261,7 +261,6 @@ struct config_channel_entry
int cycle_host_change; int cycle_host_change;
int host_in_topic; int host_in_topic;
int resv_forcepart; int resv_forcepart;
int kick_no_rejoin_time;
int exempt_cmode_c; int exempt_cmode_c;
int exempt_cmode_C; int exempt_cmode_C;

View File

@ -668,12 +668,6 @@ static struct InfoStruct info_table[] = {
&ConfigChannel.resv_forcepart, &ConfigChannel.resv_forcepart,
"Force-part local users on channel RESV" "Force-part local users on channel RESV"
}, },
{
"kick_no_rejoin_time",
OUTPUT_DECIMAL,
&ConfigChannel.kick_no_rejoin_time,
"The amount of time that a user cannot rejoin a +J channel for after being kicked."
},
{ {
"disable_hidden", "disable_hidden",
OUTPUT_BOOLEAN_YN, OUTPUT_BOOLEAN_YN,

View File

@ -861,10 +861,10 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
DICTIONARY_FOREACH(md, &iter, chptr->metadata) DICTIONARY_FOREACH(md, &iter, chptr->metadata)
{ {
if(!strcmp(md->value, "KICKNOREJOIN") && !strcmp(md->name, text) && (md->timevalue + ConfigChannel.kick_no_rejoin_time > rb_current_time())) if(!strcmp(md->value, "KICKNOREJOIN") && !strcmp(md->name, text) && (md->timevalue + 2 > rb_current_time()))
return ERR_KICKNOREJOIN; return ERR_KICKNOREJOIN;
/* cleanup any stale KICKNOREJOIN metadata we find while we're at it */ /* cleanup any stale KICKNOREJOIN metadata we find while we're at it */
if(!strcmp(md->value, "KICKNOREJOIN") && !(md->timevalue + ConfigChannel.kick_no_rejoin_time > rb_current_time())) if(!strcmp(md->value, "KICKNOREJOIN") && !(md->timevalue + 2 > rb_current_time()))
channel_metadata_delete(chptr, md->name, 0); channel_metadata_delete(chptr, md->name, 0);
} }

View File

@ -2287,7 +2287,6 @@ static struct ConfEntry conf_channel_table[] =
{ "use_forward", CF_YESNO, NULL, 0, &ConfigChannel.use_forward }, { "use_forward", CF_YESNO, NULL, 0, &ConfigChannel.use_forward },
{ "use_local_channels", CF_YESNO, NULL, 0, &ConfigChannel.use_local_channels }, { "use_local_channels", CF_YESNO, NULL, 0, &ConfigChannel.use_local_channels },
{ "resv_forcepart", CF_YESNO, NULL, 0, &ConfigChannel.resv_forcepart }, { "resv_forcepart", CF_YESNO, NULL, 0, &ConfigChannel.resv_forcepart },
{ "kick_no_rejoin_time", CF_TIME, NULL, 0, &ConfigChannel.kick_no_rejoin_time },
{ "exempt_cmode_c", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_c }, { "exempt_cmode_c", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_c },
{ "exempt_cmode_C", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_C }, { "exempt_cmode_C", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_C },
{ "exempt_cmode_D", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_D }, { "exempt_cmode_D", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_D },

View File

@ -788,7 +788,6 @@ set_default_conf(void)
ConfigChannel.no_join_on_split = NO; ConfigChannel.no_join_on_split = NO;
ConfigChannel.no_create_on_split = YES; ConfigChannel.no_create_on_split = YES;
ConfigChannel.resv_forcepart = YES; ConfigChannel.resv_forcepart = YES;
ConfigChannel.kick_no_rejoin_time = 30;
ConfigChannel.exempt_cmode_c = NO; ConfigChannel.exempt_cmode_c = NO;
ConfigChannel.exempt_cmode_C = NO; ConfigChannel.exempt_cmode_C = NO;