• If you need help or want to discuss things, you now can also join us on our Discord Server!

EN [Request] Add a servergroup only if a user is already in a admin group

Krzyzak

Member
Hello, request

A plugin that will only allow the user to add a servergroup if it has an admin servergroup

e.g. I can add a servergroup to a user with servergroupID 20, but i cannot add the servergroup to a user with no servergroups.
 

Lukas Westholt

Active Member
Contributor
Hello,

Your proposal is only indirectly implementable. Sinusbot can not ban servergroup-adds. Indirectly it is possible: The bot waits for the event.serverGroupAdded, and then when it arrives, it checks whether the client was also allowed to get the server group and if not, he removes the server group from the client. It's not that complicated, but such a script has not been written yet.
best regards
 

Krzyzak

Member
Can You make it so i can specify which servergroups to block if the user has no whitelisted servergroups?
 

Krzyzak

Member
As you are already here, how do i write a script that will assign a servergroup if a user reaches a specified idle time?

Variables needed: AFK servergroup ID, Servergroup to add AFK group, max idle time, revoke servergroup when not idle.
 

Krzyzak

Member
In regards to the prvious script, when i whitelist the default group it doesn't work. i.e. I only want a specific servergroup to be aded to people with the default servergroup. When i define id:7 in the whitelist config, when i try to add a group to a user the bot automatically revokes it.

Maybe you could add a config for blacklisted servergroups as well to the settings :)?
 

Lukas Westholt

Active Member
Contributor
In regards to the prvious script, when i whitelist the default group it doesn't work. i.e. I only want a specific servergroup to be aded to people with the default servergroup. When i define id:7 in the whitelist config, when i try to add a group to a user the bot automatically revokes it.

Maybe you could add a config for blacklisted servergroups as well to the settings :)?
Can you explain this in more detail?
 

Lukas Westholt

Active Member
Contributor
Maybe you could add a config for blacklisted servergroups as well to the settings :)?
This is possible but how should it works? If the client has a servergroup that is defined in the blacklisted servergroups the bot should revokes the add?
 

Krzyzak

Member
yeah, if a user has a servergroup on the blacklist, the bot revoke the add. Also i spotted that the whitelist doesnt work with the default group.
I have created a New Admin servergroup that can only be added to users with the default server group Guest (7), when I wirte 7 in the whitelist the bot still revokes the serbergroup.
 

Lukas Westholt

Active Member
Contributor
yeah, if a user has a servergroup on the blacklist, the bot revoke the add. Also i spotted that the whitelist doesnt work with the default group.
I have created a New Admin servergroup that can only be added to users with the default server group Guest (7), when I wirte 7 in the whitelist the bot still revokes the serbergroup.
Ah ok now i understand it. The problem is that the guest group is the servergroup for clients when the clients has no other servergroups. I can fix this.
 
Top