ULX

Author Topic: Question about Users and which files to use  (Read 3409 times)

0 Members and 3 Guests are viewing this topic.

Offline BrandonR

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Question about Users and which files to use
« on: May 22, 2007, 08:14:07 PM »
I have ULib, ULX, and UTeam all installed on a new dedicated server and I must admit, I'm a little confused over which files to use for which reason.

The files I'm referring to are:

garrysmod/data/UTeam.txt
garrysmod/data/users.txt
garrysmod/addons/ulib/data/ULib/groups.txt
garrysmod/addons/ulib/data/ULib/users.txt

I'm trying to understand waht I need in each file and which to use and here's what I have so far: UTeam.txt is simply for assigning teams to different groups so that they'll show up in the Scoreboard I use (I'm currently using this: http://garrysmod.org/downloads/?a=view&id=4637 )

Now it's the others I'm confused for. I currently have my admins and everything setup in my /data/userr.txt file and my two users and groups.txt files in the ULib folder are empty. Should I be using them instead? In conjunction with data/users.txt? What are they used for?! Thanks!

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Question about Users and which files to use
« Reply #1 on: May 23, 2007, 01:11:57 PM »
The easiest way to add users is with the "ulx adduser" command (enter without prameteres for more help).

Unless you plan on making custom groups there is no need to do anything with /data/ULib/groups.txt.
You only need to edt /data/ULib/users.txt if you are adding users manualy (or removing a user) [not for the faint of heart]
Unless you are making custom groups, and as a result custom teams, modifying /data/UTeam.txt should be simply a matter of changing the values (name, hp, etc...) to suit your needs.

I'm not sure where /data/users.txt comes from. Perhapse another mod. Anyone else know?

P.S. Unless I missed something in a reacent update the data files are always written to the main data directory, even if they were origionaly in the addon data directory, so you will want to edit the files in the main data directory (and sub directories) rather than the ones in the addons data directory.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline BrandonR

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Question about Users and which files to use
« Reply #2 on: May 23, 2007, 05:42:37 PM »
The garrysmod/data/users.txt is (I believe) the original Garry's Mod users file, which is how I made myself administrator of my own server when I first set it up (before I installed Ulib and Ulx). I guess I'm wondering if I should even be using that file, or both that one and the ULX one, or what.

Also, if groups.txt editing isn't really necessary unless I want custom groups, how would I set group permissions? Or are you referring to me just editing permissions on a user by user basis?

And one last thing (sorry for so many questions :)), in the following bit of example code for users.txt:
Code: [Select]
Format of admin account in users.txt--
"<account_name>"
{
"id" "<name|ip|steamid|clantag>"
"type" "<name|ip|steamid|clantag>"
"pass" "<password>"
"pass_req" "<0|1>"
"groups"
{
"1" "superadmin"
"2" "immunity"
}
"allow"
{
"1" "ulx kick"
"2" "ulx ban"
}
"deny"
{
"1" "ulx cexec"
}
}

First of all, I assume that for a person to have the immunity, I'd have to make a group called immunity, but how would such a group be invincible from damage? Special coding?

And in the allow/deny commands sections, is there any reason or form/fashion for the numbering of the commands? Like 1 - ulx kick, 2 - ulx ban? Do those numbers refer to something or are they just numbering for numbering's sake? Thanks so much! I'm enjoying the mod so far, and am slowly learning Lua since I'm a PHP and C programmer originally.

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Question about Users and which files to use
« Reply #3 on: May 23, 2007, 07:52:48 PM »
The default GMod users file is /garrysmod/settings/users.txt. ULX/ULib will, by default, import users from the default list if you add them to it.

Sorry, you can also use groups.txt to edit the permissions of the default access groups. Just create an entry for the groups you are modifying.
ex. denying admins access to ban
Code: [Select]
"Out"
{
    "admin"
    {
        "deny"
        {
            "1"    "ulx ban"
        }
    }
}

The immunity group is a specially defined group.

The numbering of the allow/deny section comes from using util.TableToKeyValues. What does this mean for you? Just that the numbers don't really matter as long as there are no repeats in the either of the blocks.

I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline AJ92

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: Question about Users and which files to use
« Reply #4 on: May 24, 2007, 01:19:18 AM »
hi umm i know im kind coming in when you guys are talking but i think hes talking about the

addons/ulib/data/ULib/user.txt im only saying this becuase there is no data/user.txt

he also got the format from there ya i dont know how to set it up but it looks like to me he wants help seting that part up or something

Offline BrandonR

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Question about Users and which files to use
« Reply #5 on: May 24, 2007, 08:30:29 AM »
Actually I think I have it figured out for now. Thanks spbogie!