Add the +J channelmode and config options, though they don't do anything yet.

This commit is contained in:
B.Greenham 2010-02-26 00:30:39 -05:00
parent f966f567b8
commit 846aa234b8
9 changed files with 19 additions and 1 deletions

View File

@ -346,6 +346,7 @@ 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

@ -784,6 +784,11 @@ 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

@ -37,6 +37,8 @@ NO PARAMETERS:
change nick. change nick.
+G - Block messages in all caps. Messages that are more than +G - Block messages in all caps. Messages that are more than
50% capital letters will be blocked. 50% capital letters will be blocked.
+J - Prevent autorejoin on kick. Users will not be able to
rejoin immediately after being kicked.
WITH PARAMETERS: WITH PARAMETERS:
+f - Forward. Forwards users who cannot join because of +i, +f - Forward. Forwards users who cannot join because of +i,

View File

@ -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_NOKICK 0x64000 /* Disable /kick on this channel */
#define MODE_NONICK 0x128000 /* Disable /nick for anyone 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_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_BAN 0x10000000 /* ban channel flag */
#define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */ #define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */

View File

@ -241,6 +241,7 @@ 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;
}; };
struct config_server_hide struct config_server_hide

View File

@ -602,6 +602,12 @@ 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

@ -1406,7 +1406,7 @@ struct ChannelMode chmode_table[256] =
{chm_simple, MODE_NOCAPS }, /* G */ {chm_simple, MODE_NOCAPS }, /* G */
{chm_nosuch, 0 }, /* H */ {chm_nosuch, 0 }, /* H */
{chm_ban, CHFL_INVEX }, /* I */ {chm_ban, CHFL_INVEX }, /* I */
{chm_nosuch, 0 }, /* J */ {chm_simple, MODE_NOREJOIN }, /* J */
{chm_nosuch, 0 }, /* K */ {chm_nosuch, 0 }, /* K */
{chm_staff, MODE_EXLIMIT }, /* L */ {chm_staff, MODE_EXLIMIT }, /* L */
{chm_nosuch, 0 }, /* M */ {chm_nosuch, 0 }, /* M */

View File

@ -2226,6 +2226,7 @@ static struct ConfEntry conf_channel_table[] =
{ "use_knock", CF_YESNO, NULL, 0, &ConfigChannel.use_knock }, { "use_knock", CF_YESNO, NULL, 0, &ConfigChannel.use_knock },
{ "use_forward", CF_YESNO, NULL, 0, &ConfigChannel.use_forward }, { "use_forward", CF_YESNO, NULL, 0, &ConfigChannel.use_forward },
{ "resv_forcepart", CF_YESNO, NULL, 0, &ConfigChannel.resv_forcepart }, { "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 } { "\0", 0, NULL, 0, NULL }
}; };

View File

@ -767,6 +767,7 @@ 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;
ConfigServerHide.flatten_links = 0; ConfigServerHide.flatten_links = 0;
ConfigServerHide.links_delay = 300; ConfigServerHide.links_delay = 300;