Ulysses

General => Developers Corner => Topic started by: lynx on March 11, 2015, 11:28:38 AM

Title: Kick on player auth after adding to the UCL
Post by: lynx 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)
Title: Re: Kick on player auth after adding to the UCL
Post by: Bite That Apple 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.
Title: Re: Kick on player auth after adding to the UCL
Post by: MrPresident 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.
Title: Re: Kick on player auth after adding to the UCL
Post by: JamminR 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 (http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#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".


Title: Re: Kick on player auth after adding to the UCL
Post by: Aaron113 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.
Title: Re: Kick on player auth after adding to the UCL
Post by: lynx 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)
Title: Re: Kick on player auth after adding to the UCL
Post by: Stickly Man! 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.