Author Topic: ULX automaticaly add users to Group?  (Read 2493 times)

0 Members and 3 Guests are viewing this topic.

Offline Frozenmlenz

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
ULX automaticaly add users to Group?
« on: October 02, 2015, 06:37:53 AM »
Hey Community! :)

I installed ULX yesterday and got 2 problems: :-[
First thing is, that i want to add everybody that connects on my server to the "user" group.
Second thing is, that i want to add everybody that has played a certain amount of hours on my server to a "VIP" group.

Thank you! :-*

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: ULX automaticaly add users to Group?
« Reply #1 on: October 02, 2015, 10:58:38 AM »
People who join your server are by default considered "users by ULX. They don't show up in XGUI because, in order to, you'd have to perform a lot of writes to users.txt, and the bigger that gets, the worse the performance gets.
As for auto promotion, check out the Releases section. AutoPromote / AutoPromote XGUI are what you seek.
bw81@ulysses-forums ~ % whoami
Homepage

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX automaticaly add users to Group?
« Reply #2 on: October 02, 2015, 02:31:08 PM »
But again, make sure those you auto-promote to VIP have been on MANY hours.
We often see people come here with hundreds if not thousands of people in a group that were added by some auto script complaining of big lag and crashes every time someone joins because the user file is too large.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: ULX automaticaly add users to Group?
« Reply #3 on: October 03, 2015, 08:40:26 AM »
A bit off topic, but I wonder what the cause of the crashes is? Is it the size of the file, or the sheer amount of text that needs to be sifted through in order to find the data for a specific player? Would splitting the users.txt file up after a certain number of players/lines/kBs remedy the issue?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: ULX automaticaly add users to Group?
« Reply #4 on: October 03, 2015, 09:25:59 AM »
A bit off topic, but I wonder what the cause of the crashes is? Is it the size of the file, or the sheer amount of text that needs to be sifted through in order to find the data for a specific player? Would splitting the users.txt file up after a certain number of players/lines/kBs remedy the issue?
It's just the size of the file.
Unlike a database akin to MySQL, psuedo-database files like the ULib users and groups registries must be loaded into memory in their entirety to do anything with.
This is the code from UCL (I believe) that collects the data from users.txt and parses it for ucl.users:
Code: [Select]
ucl.users, err = ULib.parseKeyValues( ULib.removeCommentHeader( ULib.fileRead( path, true ) or "", "/" ) )ULib.fileRead() produces the entire contents of a file from start to end. Looping line-by-line, you can see how bad things get when you have a large file.

Now, if Team Ulysses would push for SQL support... ;)
bw81@ulysses-forums ~ % whoami
Homepage

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX automaticaly add users to Group?
« Reply #5 on: October 03, 2015, 01:03:35 PM »
I take offense to you and others constant 'blame Team Ulysses for not having SQL' attitude.
We've explained before reasons why we don't. I'm not going into full reasons again.
Summarized in a few sentences - Gmod doesn't have it's own SQL binaries included, all current 3rd party SQL libraries have had non-stable, unreliable history, and Team Ulysses doesn't have the time to develop and maintain it's own since we can't rely on others.
ULX 4 development map is geared friendlier towards SQL, but, until Gmod includes it by default, we're not making any headway.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: ULX automaticaly add users to Group?
« Reply #6 on: October 03, 2015, 04:30:17 PM »
I take offense to you and others constant 'blame Team Ulysses for not having SQL' attitude.
We've explained before reasons why we don't. I'm not going into full reasons again.
Summarized in a few sentences - Gmod doesn't have it's own SQL binaries included, all current 3rd party SQL libraries have had non-stable, unreliable history, and Team Ulysses doesn't have the time to develop and maintain it's own since we can't rely on others.
ULX 4 development map is geared friendlier towards SQL, but, until Gmod includes it by default, we're not making any headway.

I only meant it to be satire, perhaps I could've notated that better.
I apologize for bringing back a sore subject.
bw81@ulysses-forums ~ % whoami
Homepage