Author Topic: Request for admin groups  (Read 10327 times)

0 Members and 1 Guest are viewing this topic.

Stevess

  • Guest
Request for admin groups
« on: July 03, 2007, 12:41:50 PM »
I've tried to make admin groups in ulib but it's really hard to do. If anyone that knows how and would help i only need 3.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Request for admin groups
« Reply #1 on: July 03, 2007, 05:48:01 PM »
"ulx adduser name admin"
Experiencing God's grace one day at a time.

Offline SkuD

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Request for admin groups
« Reply #2 on: July 11, 2007, 08:44:13 AM »
I think he means he wants to create 3 groups of admins, so he can add users to those groups.  Like Super Admin, Admin, Basic Admin.  I don't think he is asking how too add a user to admin.  Also, don't forget that not everyone knows code or understands things as well as you do.  Explanations can go along way.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Request for admin groups
« Reply #3 on: July 11, 2007, 03:25:26 PM »
Skud, We understand. Thanks. :)
However. We've explained until we're blue in the face. (and other colors that the human face just shouldn't turn)
Both on this forum (which, actually, contains some of the best explanations I think), and on facepunch.

Most (not all, but, unfortunately, most) aren't willing to read and research what we've attempted to explain in various answers here and on FP seemingly hundreds of times before.
So, we often limit ourselves to one or two sentence answers.

Stevess,
The best way to learn is to look at examples on this forum (search for groups.txt or groups), or look at the file which we include in your addons/Ulib/data/format.txt
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline SkuD

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Request for admin groups
« Reply #4 on: July 12, 2007, 07:28:41 AM »
Indeed, people tend to post first, and search later.  I would answer his questions but I have not yet jumped into the full extent of the lua code for ulx.  You could probably have a giant READ ME FIRST ALL YOUR QUESTIONS ANSWERED HERE post, and people who still ask questions.  :D

Jethro

  • Guest
Adding groups manually to groups.txt
« Reply #5 on: July 28, 2007, 03:00:30 PM »
I read the format.txt and the readme but this isn't precise enough to me.
I have searched Groups & Groups.txt and have not found anything(on the forum like suggested).
Im looking to add 3 groups into the groups.txt manually with different levels of access.
I currently have this written in there(I don't know why it was just in there).
Code: [Select]
"Out"
{
"superadmin"
{
}
}
This code doesn't match the code in the format.txt
I need 3 groups.
Super Admin; which currently works fine with the code that is currently in the .txt
Super Moderators
and Moderators.

If someone could show me the format of what 3 user groups look like it would be very helpful.

Super Admins of coarse get total access
Super Moderators can; ulx kick ulx ban
Moderators can; ulx kick
Could you show me how to do this as im confused on editing the file.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Request for admin groups
« Reply #6 on: July 28, 2007, 07:56:54 PM »
What the <censor> is not to understand about the groups section of format.txt
Code: [Select]
Format of group in groups.txt--
"Out"
{
     "<group_name>"
     {
           "allow"
           {
          "1" "ulx kick"
          "2" "ulx ban"
           }
                   "deny"
           {
         "1" "ulx cexec"
                   }
     }
}

SO..
Rinse, repeat. But add your own groups.

Code: [Select]
"Out"
{
     "superadmin"
     {
     }
     "supermoderator"
     {
           "allow"
           {
          "1" "ulx blah1"
          "2" "ulx blah2"

           }
                   "deny"
           {
         "1" "ulx blah3"
                   }
     }
     "moderator"
     {
           "allow"
           {
          "1" "ulx blah1"
           }
                   "deny"
           {
         "1" "ulx blah3"
                   }
     }
}

By default, any custom group gets the same access as users. That is, they get ulx who, thetime, ulx help, and a few others I don't remember on the top of my head.
You would add/adjust the deny list for each group if you didn't want them having access to something normally given to users. (ulx who, etc)
You would add/adjust the allow list to give your custom groups the commands you wanted.

For safety, if you allow someone access to a command that also has a corresponding "un" command, add both. (Example, ulx ghost, ulx unghost)

Though we might have, or will in future, change code to be smart enough that if you give someone the original command, I'm not sure we have yet, nor is Spbogie

There, I've done half your work for you. Its not even my <censor> server.
I'm a sucker. Gimme karma. Preferably, register and become donator to our server.
« Last Edit: July 28, 2007, 08:00:33 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Re: Request for admin groups
« Reply #7 on: July 29, 2007, 05:07:49 AM »
Ok Thank You very much JamminR.
I'm sorry for being Retarded but I could not work out why the super moderator had a different format, or where to start the position of the next user.
All is sorted now=)... hopefully.

EDIT:
I need to know what a default user gets?
so far you have said they get:
ulx who

Im guessing the defaults are:
ulx adminmenu
ulx clientmenu
ulx help
ulx menu
ulx motd
ulx thetime
ulx who

(are there anymore)

Buy is that all?
I need to know if I have to give them eg. ulx adminmenu
I could not find a readme that says what are the default commands all users can get.
« Last Edit: July 29, 2007, 07:48:14 AM by Jethro »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Request for admin groups
« Reply #8 on: July 29, 2007, 01:27:50 PM »
I could not work out why the super moderator had a different format,

Technically, it doesn't. By default, superadmin can do anything, so, there are no "allow" or "deny" subgroups listed.
You could specify that superadmin have some commands "denied" if you wanted by adding that "deny" list.
I've known one server host that denied "ulx rcon" "ulx ent" and "ulx luarun" to the super admins he had. He reallly only implicitly trusted one or two to have that access, and shared his actual rcon password with them.

Though I help code ULX, I don't know all the default "user" access commands by heart.
My recommendation to get them would be to, as a superadmin, follow the instructions in this post, then run a ulx help in your own client console. The commands that list would be default once your access is removed.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Re: Request for admin groups
« Reply #9 on: July 30, 2007, 09:26:08 AM »
Very sorry to be such a pain but it hasn't worked.

This is my groups.txt now

Code: [Select]
"Out"
{
     "superadmin"
     {
     }
     "administrator"
     {
           "allow"
           {
          "1" "ulx adminmenu
          "2" "ulx ban
          "3" "ulx blind
          "4" "ulx bring
          "5" "ulx clientmenu
          "6" "ulx cloak
          "7" "ulx csay
          "8" "ulx ent
          "9 "ulx exec
          "10" "ulx freeze
          "11" "ulx ghost
          "12" "ulx gimp
          "13" "ulx god
          "14" "ulx goto
          "15" "ulx hp
          "16" "ulx ignite
          "17" "ulx jail
          "18" "ulx kick
          "19" "ulx map
          "20" "ulx mapsmenu
          "21" "ulx mute
          "22" "ulx noclip
          "23" "ulx playsound
          "24" "ulx ragdoll
          "25" "ulx rcon
          "26" "ulx slap
          "27" "ulx slay
          "28" "ulx spectate
          "29" "ulx sslay
          "30" "ulx teleport
          "31" "ulx toolallow
          "32" "ulx toolallowuser
          "33" "ulx tooldeny
          "34" "ulx tooldenyuser
          "35" "ulx tsay
          "36" "ulx unblind
          "37" "ulx uncloak
          "38" "ulx unfreeze
          "39" "ulx unghost
          "40" "ulx ungimp
          "41" "ulx ungod
          "42" "ulx unjail
          "43" "ulx unmute
          "44" "ulx unragdoll
          "45" "ulx userallow
          "46" "ulx userdeny
          "47" "ulx veto
          "48" "ulx vote
          "49" "ulx voteban
          "50" "ulx votekick
          "51" "ulx votemap2
          "52" "ulx whip
           }
     }
     "supermoderator"
     {
           "allow"
           {
          "1" "ulx adminmenu
          "2" "ulx ban
          "3" "ulx bring
          "4" "ulx clientmenu
          "5" "ulx csay
          "6" "ulx freeze
          "7" "ulx ghost
          "8" "ulx gimp
          "9" "ulx jail
          "10" "ulx kick
          "11" "ulx map
          "12" "ulx mapsmenu
          "13" "ulx mute
          "14" "ulx ragdoll
          "15" "ulx slap
          "16" "ulx slay
          "17" "ulx spectate
          "18" "ulx sslay
          "19" "ulx teleport
          "20" "ulx tooldeny
          "21" "ulx tsay
          "22" "ulx unfreeze
          "23" "ulx unghost
          "24" "ulx ungimp
          "25" "ulx unjail
          "26" "ulx unmute
          "27" "ulx unragdoll
          "28" "ulx vote
          "29" "ulx voteban
          "30" "ulx votekick
          "31" "ulx votemap2
           }
     }
     "moderator"
     {
           "allow"
           {
          "1" "ulx adminmenu
          "2" "ulx ban
          "3" "ulx bring
          "4" "ulx clientmenu
          "5" "ulx csay
          "6" "ulx jail
          "7" "ulx kick
          "8" "ulx map
          "9" "ulx mapsmenu
          "10" "ulx mute
          "11" "ulx ragdoll
          "12" "ulx slap
          "13" "ulx slay
          "14" "ulx spectate
          "15" "ulx tsay
          "16" "ulx unjail
          "17" "ulx unmute
          "18" "ulx unragdoll
          "19" "ulx vote
          "20" "ulx voteban
          "21" "ulx votekick
           }
     }
}

This is my users.txt
Code: [Select]
"Out"
{
"Redrum"
{
"type" "steamid"
"groups"
{
"1" "administrator"
}
"id" "STEAM_0:1:2781740"
}
"Elmo"
{
"id" "STEAM_0:0:14122588"
"type" "steamid"
"groups"
{
"1" "administrator"
}
}
"Jethro"
{
"id" "STEAM_0:1:11827370"
"type" "steamid"
"groups"
{
"1" "superadmin"
}
}
}


Its not working, Redrum has no Admin. Superadmin works.

I have made sure that there are no default "allow" commands like:
 o asay
 o help
 o menu
 o motd
 o psay
 o thetime
 o votemap
in the "Allow Section".
It still doenst work so I don't know what ive done wrong this time.
Only superadmin works.
« Last Edit: July 30, 2007, 05:10:36 PM by Jethro »

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Request for admin groups
« Reply #10 on: July 30, 2007, 11:21:04 AM »
Please read the Sticky and come back with the requested info.
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 JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Request for admin groups
« Reply #11 on: July 30, 2007, 04:00:52 PM »
Remember spbogie, we have to do all the work for this guy.
Give them the link.
http://forums.ulyssesmod.net/index.php/topic,383.0.html
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Request for admin groups
« Reply #12 on: July 30, 2007, 04:05:37 PM »
Wait, bogie, meg, I'm confused myself.
I just looked at our server groups.txt ... there is no "Out" { }
Is that still required or not? If not, we need to update our format.txt
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Request for admin groups
« Reply #13 on: July 30, 2007, 07:54:16 PM »
It is required in the current released versions, but in the next version we are using our own KeyValues generator/parser and have removed the need for it.
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 JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Request for admin groups
« Reply #14 on: July 30, 2007, 08:07:44 PM »
Gotcha. I'd seen the keyvalue addition, but didn't realise thats what it did. Thanks.
(see all, Ulysses is a team!)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming