ULX

Author Topic: Kick on player auth after adding to the UCL  (Read 2037 times)

0 Members and 2 Guests are viewing this topic.

Offline lynx

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 15
Kick on player auth after adding to the UCL
« on: March 11, 2015, 11:28:38 AM »
Gate Control works using the UCLAuthed hook, and it kicks them if they are not allowed access. If they have never joined the server then they won't have any UCL data and they get kicked before UCL data is added.

Is there a way to make it so that if they are not in the UCL they get added before being kicked? I know there probably is but I've not looked much into ULib, only ULX. That way it allows the admins to add them if they want to (as right now it says they are not found in the UCL)

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Kick on player auth after adding to the UCL
« Reply #1 on: March 11, 2015, 06:20:18 PM »
I don't understand your question well, but just move the command that kicks them after the authorization thing.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Kick on player auth after adding to the UCL
« Reply #2 on: March 11, 2015, 06:28:37 PM »
ULib doesn't store data for players who have no data.
You're not going to look in your users.txt file and see every guest who has ever joined the server.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Kick on player auth after adding to the UCL
« Reply #3 on: March 11, 2015, 07:30:52 PM »
I've not looked at your (nor remember looking at MrPresident's) code.
If authed is being called after the password check for the whitelist, you could call ULib.ucl.addUser if they're not in a group for the whitelist before a kick.


But remember, only use that for "special" server/whitelist guests.
You do NOT want to adduser for a busy server.
Several users of autopromote scripts have ended up in our General Help forum area wondering why the server is unstable, why groups aren't being set correctly.
It's often a few posts into the discussion that we find out they set every user to get promoted to some "regular" group after only a few short hours of playtime, and the users file is hundreds if not thousands of lines long full of "regulars".


"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Kick on player auth after adding to the UCL
« Reply #4 on: March 11, 2015, 08:34:50 PM »
But remember, only use that for "special" server/whitelist guests.
You do NOT want to adduser for a busy server.
Several users of autopromote scripts have ended up in our General Help forum area wondering why the server is unstable, why groups aren't being set correctly.
It's often a few posts into the discussion that we find out they set every user to get promoted to some "regular" group after only a few short hours of playtime, and the users file is hundreds if not thousands of lines long full of "regulars".
I did not post about it, but I was probably guilty of that back years ago when I hosted a sandbox.  Playtime based ranks.  People love it though.

Offline lynx

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 15
Re: Kick on player auth after adding to the UCL
« Reply #5 on: March 12, 2015, 12:30:02 AM »
I thought that when a player joined it stored basic information (name, steam, usergroup=user, ip) that could be used later in commands based on id (adduserid, etc)

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Kick on player auth after adding to the UCL
« Reply #6 on: March 12, 2015, 07:09:34 AM »
Nope- unfortunately not. Since we're storing users in a flatfile currently, a huge users list can cause problems on servers. Once we move over to a better saving system (database), then we might consider adding more player statistics and whatnot.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6