diff --git a/doc/example.conf b/doc/example.conf index 36a1cd8..e38519c 100755 --- a/doc/example.conf +++ b/doc/example.conf @@ -346,6 +346,7 @@ 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 afde309..34d98da 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -784,6 +784,11 @@ 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/help/opers/cmode b/help/opers/cmode index 4dd72a4..d574a97 100644 --- a/help/opers/cmode +++ b/help/opers/cmode @@ -37,6 +37,8 @@ NO PARAMETERS: change nick. +G - Block messages in all caps. Messages that are more than 50% capital letters will be blocked. + +J - Prevent autorejoin on kick. Users will not be able to + rejoin immediately after being kicked. WITH PARAMETERS: +f - Forward. Forwards users who cannot join because of +i, diff --git a/include/channel.h b/include/channel.h index 93001a3..9e84dce 100644 --- a/include/channel.h +++ b/include/channel.h @@ -177,6 +177,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p, #define MODE_NOKICK 0x64000 /* Disable /kick on this channel */ #define MODE_NONICK 0x128000 /* Disable /nick for anyone on this channel */ #define MODE_NOCAPS 0x256000 /* Block messages in all capital letters */ +#define MODE_NOREJOIN 0x512000 /* Block rejoin immediately after kick */ #define CHFL_BAN 0x10000000 /* ban channel flag */ #define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */ diff --git a/include/s_conf.h b/include/s_conf.h index 3735f5d..a78eb25 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -241,6 +241,7 @@ struct config_channel_entry int cycle_host_change; int host_in_topic; int resv_forcepart; + int kick_no_rejoin_time; }; struct config_server_hide diff --git a/modules/m_info.c b/modules/m_info.c index d47bf86..fea223c 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -602,6 +602,12 @@ 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/chmode.c b/src/chmode.c index 2319c51..fdb2604 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -1406,7 +1406,7 @@ struct ChannelMode chmode_table[256] = {chm_simple, MODE_NOCAPS }, /* G */ {chm_nosuch, 0 }, /* H */ {chm_ban, CHFL_INVEX }, /* I */ - {chm_nosuch, 0 }, /* J */ + {chm_simple, MODE_NOREJOIN }, /* J */ {chm_nosuch, 0 }, /* K */ {chm_staff, MODE_EXLIMIT }, /* L */ {chm_nosuch, 0 }, /* M */ diff --git a/src/newconf.c b/src/newconf.c index 482fd45..9488ba5 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -2226,6 +2226,7 @@ static struct ConfEntry conf_channel_table[] = { "use_knock", CF_YESNO, NULL, 0, &ConfigChannel.use_knock }, { "use_forward", CF_YESNO, NULL, 0, &ConfigChannel.use_forward }, { "resv_forcepart", CF_YESNO, NULL, 0, &ConfigChannel.resv_forcepart }, + { "kick_no_rejoin_time", CF_INT, NULL, 0, &ConfigChannel.kick_no_rejoin_time }, { "\0", 0, NULL, 0, NULL } }; diff --git a/src/s_conf.c b/src/s_conf.c index fa88a04..92deef5 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -767,6 +767,7 @@ 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; ConfigServerHide.flatten_links = 0; ConfigServerHide.links_delay = 300;