Author Topic: Auto add users to a group  (Read 4816 times)

0 Members and 2 Guests are viewing this topic.

Offline jut

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Auto add users to a group
« 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?

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Auto add users to a group
« Reply #1 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.