Bring across disable_local_channels config option from ircd-seven
This commit is contained in:
parent
f56b4e3c07
commit
341f971efa
7 changed files with 25 additions and 3 deletions
|
@ -341,6 +341,7 @@ channel {
|
||||||
only_ascii_channels = no;
|
only_ascii_channels = no;
|
||||||
resv_forcepart = yes;
|
resv_forcepart = yes;
|
||||||
channel_target_change = yes;
|
channel_target_change = yes;
|
||||||
|
disable_local_channels = no;
|
||||||
};
|
};
|
||||||
|
|
||||||
serverhide {
|
serverhide {
|
||||||
|
|
|
@ -769,6 +769,11 @@ channel {
|
||||||
* voiced users are exempt.
|
* voiced users are exempt.
|
||||||
*/
|
*/
|
||||||
channel_target_change = yes;
|
channel_target_change = yes;
|
||||||
|
|
||||||
|
/* disable local channels: if yes, then local channels will not be
|
||||||
|
* supported.
|
||||||
|
*/
|
||||||
|
disable_local_channels = no;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,7 @@ struct config_channel_entry
|
||||||
int only_ascii_channels;
|
int only_ascii_channels;
|
||||||
int resv_forcepart;
|
int resv_forcepart;
|
||||||
int channel_target_change;
|
int channel_target_change;
|
||||||
|
int disable_local_channels;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct config_server_hide
|
struct config_server_hide
|
||||||
|
|
|
@ -166,7 +166,8 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check it begins with # or &, and local chans are disabled */
|
/* check it begins with # or &, and local chans are disabled */
|
||||||
else if(!IsChannelName(name))
|
else if(!IsChannelName(name) ||
|
||||||
|
( ConfigChannel.disable_local_channels && name[0] == '&'))
|
||||||
{
|
{
|
||||||
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
|
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
|
||||||
form_str(ERR_NOSUCHCHANNEL), name);
|
form_str(ERR_NOSUCHCHANNEL), name);
|
||||||
|
|
|
@ -524,6 +524,12 @@ static struct InfoStruct info_table[] = {
|
||||||
&ConfigChannel.kick_on_split_riding,
|
&ConfigChannel.kick_on_split_riding,
|
||||||
"Kick users riding splits to join +i or +k channels"
|
"Kick users riding splits to join +i or +k channels"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"disable_local_channels",
|
||||||
|
OUTPUT_BOOLEAN_YN,
|
||||||
|
&ConfigChannel.disable_local_channels,
|
||||||
|
"Disable local channels (&channels)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"max_bans",
|
"max_bans",
|
||||||
OUTPUT_DECIMAL,
|
OUTPUT_DECIMAL,
|
||||||
|
|
|
@ -2210,6 +2210,7 @@ static struct ConfEntry conf_channel_table[] =
|
||||||
{ "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 },
|
||||||
{ "channel_target_change", CF_YESNO, NULL, 0, &ConfigChannel.channel_target_change },
|
{ "channel_target_change", CF_YESNO, NULL, 0, &ConfigChannel.channel_target_change },
|
||||||
|
{ "disable_local_channels", CF_YESNO, NULL, 0, &ConfigChannel.disable_local_channels },
|
||||||
{ "\0", 0, NULL, 0, NULL }
|
{ "\0", 0, NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -244,12 +244,19 @@ isupport_chanmodes(const void *ptr)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
isupport_chantypes(const void *ptr)
|
||||||
|
{
|
||||||
|
return ConfigChannel.disable_local_channels ? "#" : "&#";
|
||||||
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
isupport_chanlimit(const void *ptr)
|
isupport_chanlimit(const void *ptr)
|
||||||
{
|
{
|
||||||
static char result[30];
|
static char result[30];
|
||||||
|
|
||||||
rb_snprintf(result, sizeof result, "&#:%i", ConfigChannel.max_chans_per_user);
|
rb_snprintf(result, sizeof result, "%s:%i",
|
||||||
|
ConfigChannel.disable_local_channels ? "#" : "&#", ConfigChannel.max_chans_per_user);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +304,7 @@ init_isupport(void)
|
||||||
static int channellen = LOC_CHANNELLEN;
|
static int channellen = LOC_CHANNELLEN;
|
||||||
static int topiclen = TOPICLEN;
|
static int topiclen = TOPICLEN;
|
||||||
|
|
||||||
add_isupport("CHANTYPES", isupport_string, "&#");
|
add_isupport("CHANTYPES", isupport_chantypes, NULL);
|
||||||
add_isupport("EXCEPTS", isupport_boolean, &ConfigChannel.use_except);
|
add_isupport("EXCEPTS", isupport_boolean, &ConfigChannel.use_except);
|
||||||
add_isupport("INVEX", isupport_boolean, &ConfigChannel.use_invex);
|
add_isupport("INVEX", isupport_boolean, &ConfigChannel.use_invex);
|
||||||
add_isupport("CHANMODES", isupport_chanmodes, NULL);
|
add_isupport("CHANMODES", isupport_chanmodes, NULL);
|
||||||
|
|
Loading…
Reference in a new issue