Ulysses

General => Developers Corner => Topic started by: jut on October 22, 2020, 09:29:49 AM

Title: Auto add users to a group
Post by: jut on October 22, 2020, 09:29:49 AM
I have a question and forgive my lack of knowledge but I was wondering if it was something that is possible that if an admin/staff member were to kick or ban a user for inappropriate conduct could it trigger the system to auto add the offender to a different user group that I have made designated for players that have caused issues before?
Title: Re: Auto add users to a group
Post by: MrPresident on October 22, 2020, 12:28:31 PM
Totally possible.. but not without modification or writing your own code.

Hook into the command called function and then get if it was kick/ban then run your code to change their group:

http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#ULibCommandCalled
http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.addGroup

Those are the functions/hooks you will need to do it.