From 1add004b978163b3fe5d6b04619a004fe16bb948 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Fri, 21 May 2010 04:20:45 -0400 Subject: [PATCH] Change kicknorejoin to be hardcoded to 2 seconds instead of a configurable opton. --- NEWS | 8 +++++++- doc/example.conf | 1 - doc/reference.conf | 5 ----- include/s_conf.h | 1 - modules/m_info.c | 6 ------ src/channel.c | 4 ++-- src/newconf.c | 1 - src/s_conf.c | 1 - 8 files changed, 9 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index bfd88de..7655692 100644 --- a/NEWS +++ b/NEWS @@ -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). +-- 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 new configuration options diff --git a/doc/example.conf b/doc/example.conf index 8ea9132..0131d15 100755 --- a/doc/example.conf +++ b/doc/example.conf @@ -396,7 +396,6 @@ channel { cycle_host_change = yes; host_in_topic = yes; resv_forcepart = yes; - kick_no_rejoin_time = 30 seconds; }; serverhide { diff --git a/doc/reference.conf b/doc/reference.conf index 81c0942..d6b4647 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -892,11 +892,6 @@ channel { * when a RESV is issued. */ 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; }; diff --git a/include/s_conf.h b/include/s_conf.h index 50f403d..465ee84 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -261,7 +261,6 @@ struct config_channel_entry int cycle_host_change; int host_in_topic; int resv_forcepart; - int kick_no_rejoin_time; int exempt_cmode_c; int exempt_cmode_C; diff --git a/modules/m_info.c b/modules/m_info.c index 0efc69d..dbc013a 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -668,12 +668,6 @@ static struct InfoStruct info_table[] = { &ConfigChannel.resv_forcepart, "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", OUTPUT_BOOLEAN_YN, diff --git a/src/channel.c b/src/channel.c index 74767f4..f30a069 100644 --- a/src/channel.c +++ b/src/channel.c @@ -861,10 +861,10 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key) 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; /* 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); } diff --git a/src/newconf.c b/src/newconf.c index 6321d40..477b40a 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -2287,7 +2287,6 @@ static struct ConfEntry conf_channel_table[] = { "use_forward", CF_YESNO, NULL, 0, &ConfigChannel.use_forward }, { "use_local_channels", CF_YESNO, NULL, 0, &ConfigChannel.use_local_channels }, { "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_D", CF_YESNO, NULL, 0, &ConfigChannel.exempt_cmode_D }, diff --git a/src/s_conf.c b/src/s_conf.c index b03a130..8818a02 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -788,7 +788,6 @@ set_default_conf(void) ConfigChannel.no_join_on_split = NO; ConfigChannel.no_create_on_split = YES; ConfigChannel.resv_forcepart = YES; - ConfigChannel.kick_no_rejoin_time = 30; ConfigChannel.exempt_cmode_c = NO; ConfigChannel.exempt_cmode_C = NO;