#ifndef STATIC_MODULES
char *m_bn;
- m_bn = irc_basename((char *) data);
+ m_bn = rb_basename((char *) data);
if(findmodule_byname(m_bn) != -1)
return;
static struct mode_table oper_table[] = {
{"encrypted", OPER_ENCRYPTED },
- {"local_kill", OPER_LOCKILL },
- {"global_kill", OPER_GLOBKILL|OPER_LOCKILL },
- {"remote", OPER_REMOTE },
- {"kline", OPER_KLINE },
- {"unkline", OPER_UNKLINE },
- {"nick_changes", OPER_NICKS },
- {"rehash", OPER_REHASH },
- {"die", OPER_DIE },
- {"admin", OPER_ADMIN },
- {"hidden_admin", OPER_HADMIN },
- {"xline", OPER_XLINE },
- {"resv", OPER_RESV },
- {"operwall", OPER_OPERWALL },
- {"oper_spy", OPER_SPY },
- {"hidden_oper", OPER_INVIS },
- {"remoteban", OPER_REMOTEBAN },
- {"mass_notice", OPER_MASSNOTICE },
+ {"need_ssl", OPER_NEEDSSL },
{NULL, 0}
};
{"no_tilde", CONF_FLAGS_NO_TILDE },
{"need_ident", CONF_FLAGS_NEED_IDENTD },
{"have_ident", CONF_FLAGS_NEED_IDENTD },
+ {"need_ssl", CONF_FLAGS_NEED_SSL },
{"need_sasl", CONF_FLAGS_NEED_SASL },
{NULL, 0}
};
if (!set)
{
- conf_report_error("Warning -- unknown parent privilege set %s for %s; ignored.", yy_privset_extends, conf_cur_block_name);
+ conf_report_error("Warning -- unknown parent privilege set %s for %s; assuming defaults", yy_privset_extends, conf_cur_block_name);
- rb_free(yy_privset_extends);
- rb_free(privs);
-
- yy_privset_extends = NULL;
- return;
+ set = privilegeset_get("default");
}
privilegeset_extend(set, conf_cur_block_name != NULL ? conf_cur_block_name : "<unknown>", privs, 0);
}
yy_oper = make_oper_conf();
- yy_oper->flags |= OPER_ENCRYPTED|OPER_RESV|OPER_OPERWALL|OPER_REMOTEBAN|OPER_MASSNOTICE;
+ yy_oper->flags |= OPER_ENCRYPTED;
return 0;
}
return 0;
}
+
+ if (!yy_oper->privset)
+ yy_oper->privset = privilegeset_get("default");
+
/* now, yy_oper_list contains a stack of oper_conf's with just user
* and host in, yy_oper contains the rest of the information which
* we need to copy into each element in yy_oper_list
}
static void
-conf_set_class_cidr_bitlen(void *data)
+conf_set_class_cidr_ipv4_bitlen(void *data)
{
+ unsigned int maxsize = 32;
+ if(*(unsigned int *) data > maxsize)
+ conf_report_error
+ ("class::cidr_ipv4_bitlen argument exceeds maxsize (%d > %d) - ignoring.",
+ *(unsigned int *) data, maxsize);
+ else
+ yy_class->cidr_ipv4_bitlen = *(unsigned int *) data;
+
+}
+
#ifdef RB_IPV6
+static void
+conf_set_class_cidr_ipv6_bitlen(void *data)
+{
unsigned int maxsize = 128;
-#else
- unsigned int maxsize = 32;
-#endif
if(*(unsigned int *) data > maxsize)
conf_report_error
- ("class::cidr_bitlen argument exceeds maxsize (%d > %d) - ignoring.",
+ ("class::cidr_ipv6_bitlen argument exceeds maxsize (%d > %d) - ignoring.",
*(unsigned int *) data, maxsize);
else
- yy_class->cidr_bitlen = *(unsigned int *) data;
+ yy_class->cidr_ipv6_bitlen = *(unsigned int *) data;
}
+#endif
+
static void
conf_set_class_number_per_cidr(void *data)
{
static struct ConfEntry conf_class_table[] =
{
{ "ping_time", CF_TIME, conf_set_class_ping_time, 0, NULL },
- { "cidr_bitlen", CF_INT, conf_set_class_cidr_bitlen, 0, NULL },
+ { "cidr_ipv4_bitlen", CF_INT, conf_set_class_cidr_ipv4_bitlen, 0, NULL },
+#ifdef RB_IPV6
+ { "cidr_ipv6_bitlen", CF_INT, conf_set_class_cidr_ipv6_bitlen, 0, NULL },
+#endif
{ "number_per_cidr", CF_INT, conf_set_class_number_per_cidr, 0, NULL },
{ "number_per_ip", CF_INT, conf_set_class_number_per_ip, 0, NULL },
{ "number_per_ip_global", CF_INT,conf_set_class_number_per_ip_global, 0, NULL },