1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 03:13:13 +02:00

- Added set::options::disable-cap, which can be used to disable the

new CAP support (#4104).
This commit is contained in:
Bram Matthys
2012-10-15 15:29:52 +02:00
parent 96eb692cc6
commit eb12f79ba3
5 changed files with 27 additions and 0 deletions
+2
View File
@@ -2487,3 +2487,5 @@
no advantage anyway. Reported by nenolod (#4129).
- Various updates to makefile.win32 and .iss file, found during
building new versions of zlib, openssl, and curl.
- Added set::options::disable-cap, which can be used to disable the
new CAP support (#4104).
+4
View File
@@ -2519,6 +2519,10 @@ set {
<p><font class="set">set::options::allow-insane-bans;</font><br>
Allow insane broad bans like /GLINE *@*.xx. This makes it very easy to
accidentally ban everyone on your network, so use with great care!</p>
<p><font class="set">set::options::disable-cap;</font><br>
Disable IRC Client Capabilities Extensions (CAP). Note that this makes
SASL and various other features unavailable or harder for clients to
use.</p>
<p id="set_nopost_ban_action"><font class="set">set::nopost::ban-action</font> (requires <a href="#modules_m_nopost">m_nopost</a>)<br />
Action to take on a user if he tries to perform an HTTP POST command.
The allowed values are: kill, gline, gzline, kline, zline, shun, and tempshun.
+5
View File
@@ -83,6 +83,7 @@ struct zConfiguration {
unsigned mkpasswd_for_everyone:1;
unsigned allow_insane_bans;
unsigned allow_part_if_shunned:1;
unsigned disable_cap:1;
unsigned check_target_nick_bans:1;
unsigned use_egd : 1;
long host_timeout;
@@ -266,6 +267,8 @@ extern MODVAR aConfiguration iConf;
#define ALLOW_PART_IF_SHUNNED iConf.allow_part_if_shunned
#define DISABLE_CAP iConf.disable_cap
#define BAN_VERSION_TKL_TIME iConf.ban_version_tkl_time
#define SILENCE_LIMIT (iConf.silence_limit ? iConf.silence_limit : 15)
@@ -306,6 +309,7 @@ struct SetCheck {
unsigned has_dont_resolve:1;
unsigned has_mkpasswd_for_everyone:1;
unsigned has_allow_part_if_shunned:1;
unsigned has_disable_cap:1;
unsigned has_ssl_egd:1;
unsigned has_ssl_server_cipher_list :1;
unsigned has_dns_timeout:1;
@@ -402,6 +406,7 @@ struct SetCheck {
unsigned has_options_mkpasswd_for_everyone:1;
unsigned has_options_allow_insane_bans:1;
unsigned has_options_allow_part_if_shunned:1;
unsigned has_options_disable_cap:1;
int cgiirc_type; /* cheat :( */
unsigned has_cgiirc_hosts:1;
unsigned has_cgiirc_webpass:1;
+10
View File
@@ -407,6 +407,16 @@ DLLFUNC int m_cap(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
struct clicap_cmd *cmd;
if (DISABLE_CAP)
{
/* I know nothing! */
if (IsPerson(sptr))
sendto_one(sptr, err_str(ERR_UNKNOWNCOMMAND), me.name, parv[0], "CAP");
else
sendto_one(sptr, err_str(ERR_NOTREGISTERED), me.name, "CAP");
return 0;
}
if (parc < 2)
{
sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS),
+6
View File
@@ -7597,6 +7597,9 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
else if (!strcmp(cepp->ce_varname, "allow-part-if-shunned")) {
tempiConf.allow_part_if_shunned = 1;
}
else if (!strcmp(cepp->ce_varname, "disable-cap")) {
tempiConf.disable_cap = 1;
}
}
}
else if (!strcmp(cep->ce_varname, "hosts")) {
@@ -8356,6 +8359,9 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
else if (!strcmp(cepp->ce_varname, "allow-part-if-shunned")) {
CheckDuplicate(cepp, options_allow_part_if_shunned, "options::allow-part-if-shunned");
}
else if (!strcmp(cepp->ce_varname, "disable-cap")) {
CheckDuplicate(cepp, options_disable_cap, "options::disable-cap");
}
else
{
config_error_unknownopt(cepp->ce_fileptr->cf_filename,