Little trouble with security-group

If your UnrealIRCd is up and running but you have a question about it, then use this forum.
(NOT for installation or connecting issues! Use the other forum instead.)

Moderator: Supporters

Post Reply
CrazyCat
Posts: 276
Joined: Thu Apr 28, 2005 1:05 pm
Location: France
Contact:

Little trouble with security-group

Post by CrazyCat »

Hi there,
I made a security group:

Code: Select all

security-group trusted-users {
        reputation-score 9000;
        identified yes;
};
Quite simple.
But when I /whois someone:

Code: Select all

09:34 -- [UserX] is in security-groups: known-users,trusted-users,tls-users
09:34 -- [UserX] is using an IP with a reputation score of 5092
Score of 5092 but in trusted-users ? How is-it possible ?
Note that this security-group is quite old, the servers has been restarted several times since I add it...
Kelerion
Posts: 1
Joined: Thu Aug 20, 2026 9:43 am

Re: Little trouble with security-group

Post by Kelerion »

you might be looking for the following crule instead:

security-group trusted-users {
rule "is_identified() && reputation() >= 9000";
};

Kel.
PeGaSuS
Official supporter
Posts: 124
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: Little trouble with security-group

Post by PeGaSuS »

Hey CrazyCat,

That's not a bug, it's just how the security-group logic works under the hood. Each line you add (reputation-score, identified, etc.) is treated as "OR", not "AND". So what your security-group is really saying is "put anyone who's identified, OR anyone with a rep score of 9000+ on the trusted-users group" and not "identified AND high rep" like you probably intended.

Since UserX was logged in (identified), that alone was enough to get them into trusted-users, even with a rep score of only 5092.

If you want both conditions required at once, you'll need to use a rule line instead (as Kelerion suggested), since that lets you write actual AND/OR logic:

Code: Select all

security-group trusted-users {
	rule "is_identified() && reputation() >= 9000";
}
That should do what you were expecting the original security-group to do.
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
CrazyCat
Posts: 276
Joined: Thu Apr 28, 2005 1:05 pm
Location: France
Contact:

Re: Little trouble with security-group

Post by CrazyCat »

Ok... I was thinking it was AND.

gonna change that :)
Post Reply