mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 10:43:12 +02:00
Rename security-group::include-mask to ::mask. Both will work though for
a long long time. Change done to make it consistent with the rest.
This commit is contained in:
+1
-1
@@ -1870,7 +1870,7 @@ struct SecurityGroup {
|
||||
long connect_time;
|
||||
int webirc;
|
||||
int tls;
|
||||
ConfigItem_mask *include_mask;
|
||||
ConfigItem_mask *mask;
|
||||
NameList *security_group;
|
||||
/* Exclude */
|
||||
int exclude_identified;
|
||||
|
||||
+2
-2
@@ -10321,9 +10321,9 @@ int _conf_security_group(ConfigFile *conf, ConfigEntry *ce)
|
||||
else
|
||||
s->connect_time = config_checkval(cep->value, CFG_TIME);
|
||||
}
|
||||
else if (!strcmp(cep->name, "include-mask"))
|
||||
else if (!strcmp(cep->name, "mask") || !strcmp(cep->name, "include-mask"))
|
||||
{
|
||||
unreal_add_masks(&s->include_mask, cep);
|
||||
unreal_add_masks(&s->mask, cep);
|
||||
}
|
||||
else if (!strcmp(cep->name, "security-group"))
|
||||
{
|
||||
|
||||
+2
-2
@@ -806,7 +806,7 @@ SecurityGroup *add_security_group(const char *name, int priority)
|
||||
/** Free a SecurityGroup struct */
|
||||
void free_security_group(SecurityGroup *s)
|
||||
{
|
||||
unreal_delete_masks(s->include_mask);
|
||||
unreal_delete_masks(s->mask);
|
||||
unreal_delete_masks(s->exclude_mask);
|
||||
free_entire_name_list(s->security_group);
|
||||
free_entire_name_list(s->exclude_security_group);
|
||||
@@ -950,7 +950,7 @@ int user_allowed_by_security_group(Client *client, SecurityGroup *s)
|
||||
}
|
||||
if (s->tls && (IsSecureConnect(client) || (MyConnect(client) && IsSecure(client))))
|
||||
goto user_allowed;
|
||||
if (s->include_mask && unreal_mask_match(client, s->include_mask))
|
||||
if (s->mask && unreal_mask_match(client, s->mask))
|
||||
goto user_allowed;
|
||||
if (s->security_group && user_allowed_by_security_group_list(client, s->security_group))
|
||||
goto user_allowed;
|
||||
|
||||
Reference in New Issue
Block a user