Author Topic: Groups and Teams  (Read 16640 times)

0 Members and 2 Guests are viewing this topic.

Offline uritarded

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Groups and Teams
« on: December 31, 2009, 06:38:52 PM »
Uh, I just got a server indirectly 2 days ago. (My friend bought it and I'm running it for him). I've put all the addons, maps, etc that we need, and moved onto Ulx. I installed Ulx and ULib via SVN and edited the groups.txt and uteam.txt. Here they are:

groups.txt
Code: [Select]
"lord and master"
{
"allow"
{
"ulx cexec"
}
"inherit_from" "owner"
}
"owner"
{
"allow"
{
"overcomeimmunity"
}
"inherit_from" "superadmin"
}
"user"
{
"allow"
{
"ulx"
"ulx asay"
"ulx clientmenu"
"ulx help"
"ulx logchat"
"ulx logdir"
"ulx logecho"
"ulx logevents"
"ulx logfile"
"ulx logspawns"
"ulx logspawnsecho"
"ulx menu"
"ulx motd"
"ulx mytitle"
"ulx psay"
"ulx thetime"
"ulx title"
"ulx usermanagementhelp"
"ulx votebanminvotes"
"ulx votebansuccessratio"
"ulx voteecho"
"ulx votekickminvotes"
"ulx votekicksuccessratio"
"ulx votemap"
"ulx votemap2minvotes"
"ulx votemap2successratio"
"ulx votemapenabled"
"ulx votemapmapmode"
"ulx votemapmintime"
"ulx votemapminvotes"
"ulx votemapsuccessratio"
"ulx votemapvetotime"
"ulx votemapwaittime"
"ulx who"
}
"inherit_from"
}
"superadmin"
{
"allow"
{
"ulx addgroup"
"ulx adduser"
"ulx adduserid"
"ulx ent"
"ulx exec"
"ulx groupallow"
"ulx hiddenecho"
"ulx luarun"
"ulx maul"
"ulx rcon"
"ulx removegroup"
"ulx removeuser"
"ulx renamegroup"
"ulx userallow"
}
"inherit_from" "admin"
}
"admin"
{
"allow"
{
"ulx adminmenu"
"ulx armor"
"ulx ban"
"ulx banid"
"ulx banmenu"
"ulx blind"
"ulx bring"
"ulx chattime"
"ulx cloak"
"ulx csay"
"ulx freeze"
"ulx gag"
"ulx gimp"
"ulx god"
"ulx goto"
"ulx hp"
"ulx ignite"
"ulx jail"
"ulx kick"
"ulx map"
"ulx mapsmenu"
"ulx mute"
"ulx noclip"
"ulx physgunplayer"
"ulx playsound"
"ulx ragdoll"
"ulx reservedslots"
"ulx rslots"
"ulx rslotsmode"
"ulx rslotsvisible"
"ulx send"
"ulx settitle"
"ulx showmotd"
"ulx slap"
"ulx slay"
"ulx spawnecho"
"ulx spectate"
"ulx sslay"
"ulx strip"
"ulx teleport"
"ulx tsay"
"ulx unban"
"ulx unblind"
"ulx uncloak"
"ulx unfreeze"
"ulx ungag"
"ulx ungimp"
"ulx ungod"
"ulx unignite"
"ulx unigniteall"
"ulx unjail"
"ulx unmute"
"ulx unragdoll"
"ulx veto"
"ulx vote"
"ulx voteban"
"ulx votekick"
"ulx votemap2"
"ulx welcomemessage"
"ulx whip"
"urestrict allowspawn"
"urestrict denyspawn"
"urestrict npcs"
"urestrict props"
"urestrict ragdolls"
"urestrict sents"
"urestrict vehicles"
}
"inherit_from" "operator"
}
"respected"
{
"allow"
{
"ulx votekick"
"ulx goto"
"ulx teleport"
"ulx god"
"ulx bring"
"ulx noclip"
}
"inherit_from" "player"
}
"operator"
{
"allow"
{
"ulx kick"
"ulx gag"
"ulx jail"
"ulx unjail"
}
"inherit_from" "respected"
}

Uteam.txt
Code: [Select]
"Out"
{
"teams"
{
"1"
{
"name" "Lord and Master"
"group" "lord and master"
"armor" "9001"
"hp" "9001"
"color"
{
"a" "255"
"B" "255"
"g" "255"
"r" "0"
}
}
"2"
{
"name" "Owner"
"group" "owner"
"armor" "1337"
"hp" "1337"
"color"
{
"a" "0"
"B" "0"
"g" "0"
"r" "0"
}
}
"3"
{
"name" "SuperAdmins"
"group" "superadmin"
"armor" "1000"
"hp" "1000"
"color"
{
"a" "0"
"B" "51"
"g" "204"
"r" "0"
}
}
"4"
{
"name" "Admins"
"group" "admin"
"armor" "500"
"hp" "500"
"color"
{
"a" "51"
"B" "153"
"g" "255"
"r" "255"
}
}
"5"
{
"name" "Operators"
"group" "operator"
"armor" "200"
"hp" "200"
"color"
{
"a" "102"
"B" "204"
"g" "255"
"r" "255"
}
}
"6"
{
"name" "Players"
"group" "player"
"color"
{
"a" "0"
"B" "255"
"g" "255"
"r" "0"
}
"model" "male1"
}
}
"gamemodes"
{
"1" "Sandbox"
}
}

Anyways, I put them on the server, restarted, and found I was still a superadmin. My rank is still green, and nothing has been changed, except none of my ulx commands work, and when I chat, my name is invisible. When I go in console, and type anything after "ulx " then in console I get an error
Code: [Select]
ULib/shared/sh_ucl.lua:46: [ULIB] Unauthed player. I really do hope this is a simple mistake, and easily fixable. Anyone know what I did wrong? :/ And yes, I'm not editing anything in my addons folder, it's all in my data folder. Hmm, I just went on urestrict, and when I was looking at what groups to edit loadouts, all my groups in groups.txt are there, so that means they exist. I've done more tests: I took out everything in the ULib folder and let it remake itself. Superadmin, admin, and player work, with all their commands, but when I put my groups.txt back, everything breaks. I stay superadmin, and I get the error whenever I use a ulx command. :/

Oh, and how do I add users to ranks? I mean, I'm only a super admin, how do I give myself the highest rank? And does adduser allow users to add themselves to ranks higher than what they are?
« Last Edit: January 01, 2010, 12:01:30 AM by uritarded »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Groups and Teams
« Reply #1 on: December 31, 2009, 10:59:27 PM »
I'm ignoring your uteam for now.
You edited groups.txt manually without knowing what you were doing. (no malice meant in that statement, just factual)
Group "user" must exist, and must contain "ulx" in it's allow list.  (I can't find "ulx" in any of the group list, including base 'user' group)
You can use Uteam.txt to name a team called "Player" that uses the user group if you wish, but groups.txt must contain group "user".
Snce you've inherited the server, your friend may have added you originally through the method we recommend in our readme.txt file before ever using the adduser command... gmod/settings/users.txt
Since you state you're a superadmin even after the deletion of the data/ULib folder, I'm betting you're in the default Gmod users.txt file.

As for highest group, Gmod's highest defaults to superadmin. ULib/ULX lets you define any groups with "more" access commands (allow) you might want, but if you want all other scripts that look for Gmod default lua commands (IsSuperAdmin and IsAdmin), make sure they inherit superadmin by name.

If a person has access to adduser, yes, they can add anyone, including themselves, to a "higher' group.
(Note to my teammates and experienced SVN users - Yes, I know there are ways to limit that when specifying the command - I am of the belief this person isn't quite ready for that yet - time using ULib's UCL will bring experience and confidence)

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

Offline uritarded

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Groups and Teams
« Reply #2 on: December 31, 2009, 11:31:50 PM »
Hrm. I changed my "players" in my groups.txt to "users", but it still doesn't work. I suspect it has to do with what you said about
Quote
and must contain "ulx" in it's allow list.  (I can't find "ulx" in any of the group list, including base 'user' group)
, but I don't really get what your talking about with that.

Oh, and I have ftp access to the server, so I set myself as superadmin, the real owner did nothing. And yes, I am a superadmin in the users.txt in the settings folder.

Also, I figured out what I was talking about before. I wanted this command: rcon ulx adduser.

Edit: Hrm, I was looking at other groups.txt from this site, and I see what you mean. I added "ulx" to my groups.txt under user, but it still has the same error.
« Last Edit: December 31, 2009, 11:53:12 PM by uritarded »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Groups and Teams
« Reply #3 on: January 01, 2010, 12:07:13 AM »
Please see our FAQs section - specifically "Having trouble with access?"
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline uritarded

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Groups and Teams
« Reply #4 on: January 01, 2010, 12:24:15 AM »
Erm, not to be rash, but what exactly am I looking for? I have done everything here, but I cannot do ulx debuginfo because I don't have any ulx commands and I don't have a server console.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Groups and Teams
« Reply #5 on: January 01, 2010, 10:08:01 AM »
You should have server console access. This is required for almost any 'admin' type script made, and many other important functions.
First 3 are access possibilities, #3 is ulx specific.
1) Learn to use Rcon - it gives you server console access. See "Rcon" (and the rest of the Gmod administration article) at http://wiki.garrysmod.com/?title=Admin
2) Most hosted game servers have a web control panel of some sort. Ask your friend, look up FAQs at the host provider.
If not using a hosting provider aimed towards game servers, they may have other access means. (ssh RDP or VNC or other remote application)

3)
I took out everything in the ULib folder and let it remake itself. Superadmin, admin, and player work, with all their commands, but when I put my groups.txt back, everything breaks.

That seems to indicate the ULX commands work if you don't try your custom one? So, let ULib rebuild it, then instead of manually editing, add the groups you want using ulx addgroup, that will properly add it to the groups.txt file, add a permission or two to set it's allow list using ulx groupallow, then add yourself to that group.

4) I recommend not using spaces in group and team names. I've no idea if it actually breaks anything regarding ULib or UTeam... but my experience with various *nix and scripting languages, it just makes things more challenging to work with.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline uritarded

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Groups and Teams
« Reply #6 on: January 01, 2010, 02:08:14 PM »
Oh wow, that was surprisingly easy. Thanks :D I just removed my ULib folder, let it rebuild, and manually added the ranks, and then added permissions. Thanks for your time!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Groups and Teams
« Reply #7 on: January 01, 2010, 07:01:17 PM »
Welcome.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming