mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 22:23:13 +02:00
Support ::destination and ::exclude-destination in security groups / mask items
at selected places (there needs to be explicit code in place to handle this).
At the moment it is supported at two places only:
* For spamfilters (was already possible via crules via ::rule with
a destination('xyz') but now non-crule destination "#xyz"; works as well, eg:
spamfilter {
...
except {
destination "#main";
}
}
Note that if you want to exempt a destination in all spamfilters,
we already have set::spamfilter::except for that!
* In restrict commands for like channel-message and such:
set {
restrict-commands {
channel-message {
except {
connect-time 600;
destination "#test";
}
}
}
}
Allow passing a crule_context via user_allowed_by_security_group_context()
and make user_allowed_by_security_group() call that.
Actually document spamfilter::except online in the docs (yeah you
won't see it in this commit, just mentioning...)
And yeah, by now i wonder if we should really call it crule_context
since it is more like a security group matching context, but.. whatever.
This commit is contained in:
@@ -2220,6 +2220,7 @@ struct SecurityGroup {
|
||||
NameList *security_group;
|
||||
char *prettyrule; /* ::rule as a string */
|
||||
CRuleNode *rule; /**< parsed crule */
|
||||
NameList *destination;
|
||||
NameValuePrioList *extended;
|
||||
/* Exclude */
|
||||
int exclude_identified;
|
||||
@@ -2233,6 +2234,7 @@ struct SecurityGroup {
|
||||
NameList *exclude_security_group;
|
||||
char *exclude_prettyrule; /* ::exclude-rule as a string */
|
||||
CRuleNode *exclude_rule; /**< parsed crule */
|
||||
NameList *exclude_destination;
|
||||
NameValuePrioList *exclude_extended;
|
||||
/* Settings */
|
||||
DynamicSetBlock settings;
|
||||
|
||||
Reference in New Issue
Block a user