ULX

Author Topic: ULX adduser command  (Read 7923 times)

0 Members and 1 Guest are viewing this topic.

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
ULX adduser command
« on: January 20, 2016, 01:56:29 PM »
Okay so I have a particular problem so I run a serious RP server and we would like it so a us sergeant can use adduser but only be able to add a user to us private rank how would I begin to do this?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX adduser command
« Reply #1 on: January 20, 2016, 02:10:44 PM »
Code: [Select]
ulx groupallow "sergeant" "ulx adduser" "* private"
Replace sergeant and private with your correct group names.
Experiencing God's grace one day at a time.

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #2 on: January 20, 2016, 02:32:48 PM »
Now lets say for Us Major i want it to be able to white list private up to lieutenant (there are prob like 5 ranks from PVT to LT) would i do the code this way

ulx groupallow "usmajor" "ulx adduser" "* usprivate", "* uscorporal", ect.?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX adduser command
« Reply #3 on: January 20, 2016, 02:38:50 PM »
Code: [Select]
ulx groupallow "sergeant" "ulx adduser" "* private,corporal,lieutenant"
And so on
Experiencing God's grace one day at a time.

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #4 on: January 20, 2016, 04:19:07 PM »
Okay so that did work but the way I have the server setup and how the server will be set up there is gonna be 3-4 ulx branches

first branch user>trialmod>operator>admin>superadmin>developer>headadmin>owner
second branch user>usprivate>uscorporal>usspecialist>ussergeant>uslieutenant>uscaptain>usmajor>uscolonel>usgeneral

how do i make the second branch not target the first branch at all the command i have for allow_target is

ussergeant !%uscorporal,!%trialmod

it makes it so sergeant cant target anyone but can only move them to usprivate

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX adduser command
« Reply #5 on: January 20, 2016, 04:54:06 PM »
The comma is a set union. There is no set intersection operator at the moment (which is what you'd need to specify !%group1,!%group2 with multiple chains). So, the only way to do what you want is to specify what they CAN target. Like so: #user,#usprivate. I think that's what you wanted for uscorporal based off what you listed. The '#' is ONLY that specific group, where '%' considers inheritance. Does that make sense?
Experiencing God's grace one day at a time.

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #6 on: January 20, 2016, 05:10:07 PM »
It works for everything else but they still arent allowed to target user even using the command #user
« Last Edit: January 20, 2016, 05:14:17 PM by bsharpie »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX adduser command
« Reply #7 on: January 20, 2016, 05:27:24 PM »
What do you mean?
Experiencing God's grace one day at a time.

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #8 on: January 20, 2016, 05:37:22 PM »
Okay so usmajor is allowed to make everyone that is already a usprivate and promote him and then demote them back to usprivat but they cant take a new user and turn them into usprivate

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX adduser command
« Reply #9 on: January 20, 2016, 06:10:53 PM »
Run 'ulx debuginfo' and post the output here.
Experiencing God's grace one day at a time.

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #10 on: January 20, 2016, 06:32:10 PM »
Code: [Select]
ULib.ucl.users (#=4):
STEAM_0:1:36307841:
name = Bsharpie™
deny:
allow:
group = owner
STEAM_0:1:151569171:
name = Jesus
deny:
allow:
group = headadmin
STEAM_0:1:59513184:
name = RoidsdontTrainmyface
deny:
allow:
group = usprivate
STEAM_0:1:53135578:
name = Metrosyde
deny:
allow:
group = usmajor


ULib.ucl.groups (#=17):
headadmin:
can_target = !%headadmin
allow:
inherit_from = developer
uslieutenant:
can_target = #user
allow:
inherit_from = ussergeant
developer:
can_target = !%developer
allow:
1 = ulx adduser
inherit_from = superadmin
usmajor:
can_target = #user,#usprivate,#uscoporal,#usspecalist,#ussergeant,#uslieutenant,#uscaptain
allow:
ulx adduser = * <usprivate,uscorporal,usspecialist,ussergeant,uslieutenant,uscaptain>
inherit_from = uscaptain
ussergeant:
can_target = #user
allow:
ulx adduser = * usprivate
inherit_from = usspecialist
user:
allow:
1 = ulx asay
2 = ulx help
3 = ulx motd
4 = ulx psay
5 = ulx thetime
6 = ulx usermanagementhelp
7 = ulx viewlevel
8 = ulx votemap
9 = ulx who
uscolonel:
can_target = #user,#usmajor,#uscaptain,#uslieutenant,#ussergeant,#usspecialist,#uscorporal,#usprivate
allow:
ulx adduser = * <usprivate,uscorporal,usspecialist,ussergeant,uslieutenant,uscaptain,usmajor>
inherit_from = usmajor
superadmin:
can_target = !%superadmin
allow:
1 = awarn_delete
2 = awarn_options
3 = ulx addgroup
4 = ulx adduserid
5 = ulx banid
6 = ulx cexec
7 = ulx ent
8 = ulx exec
9 = ulx givelvl
10 = ulx givexp
11 = ulx groupallow
12 = ulx groupdeny
13 = ulx hiddenecho
14 = ulx logchat
15 = ulx logdir
16 = ulx logecho
17 = ulx logechocolorconsole
18 = ulx logechocolordefault
19 = ulx logechocoloreveryone
20 = ulx logechocolormisc
21 = ulx logechocolorplayer
22 = ulx logechocolorplayerasgroup
23 = ulx logechocolors
24 = ulx logechocolorself
25 = ulx logevents
26 = ulx logfile
27 = ulx logjoinleaveecho
28 = ulx logspawns
29 = ulx logspawnsecho
30 = ulx luarun
31 = ulx maul
32 = ulx rcon
33 = ulx removegroup
34 = ulx removeuser
35 = ulx removeuserid
36 = ulx renamegroup
37 = ulx reset
38 = ulx setgroupcantarget
39 = ulx setlvl
40 = ulx setxp
41 = ulx stopvote
42 = ulx userallow
43 = ulx userallowid
44 = ulx userdeny
45 = ulx userdenyid
46 = ulx voteecho
47 = xgui_gmsettings
48 = xgui_managebans
49 = xgui_managegroups
50 = xgui_svsettings
ulx adduser = $!%developer
'ulx physgunplayer' = !%superadmin
inherit_from = admin
usgeneral:
can_target = #user,#uscolonel,#usmajor,#uscaptain,#uslieutenant,#ussergeant,#usspecialist,#uscorporal,#usprivate
allow:
ulx adduser = * <usprivate,uscorporal,usspecialist,ussergeant,uslieutenant,uscaptain,usmajor,uscolonel>
inherit_from = uscolonel
owner:
allow:
inherit_from = headadmin
uscorporal:
allow:
inherit_from = usprivate
operator:
can_target = !%operator
allow:
1 = ulx seeasay
inherit_from = trialmod
admin:
can_target = !%admin
allow:
1 = awarn_remove
2 = awarn_view
3 = awarn_warn
4 = ulx armor
5 = ulx ban
6 = ulx blind
7 = ulx bring
8 = ulx chattime
9 = ulx cloak
10 = ulx csay
11 = ulx freeze
12 = ulx gag
13 = ulx getstats
14 = ulx gimp
15 = ulx god
16 = ulx goto
17 = ulx hp
18 = ulx ignite
19 = ulx jail
20 = ulx jailtp
21 = ulx kick
22 = ulx kickafternamechanges
23 = ulx kickafternamechangescooldown
24 = ulx kickafternamechangeswarning
25 = ulx map
26 = ulx mute
27 = ulx noclip
28 = ulx physgunplayer
29 = ulx playsound
30 = ulx ragdoll
31 = ulx reservedslots
32 = ulx return
33 = ulx rslots
34 = ulx rslotsmode
35 = ulx rslotsvisible
36 = ulx seeanonymousechoes
37 = ulx send
38 = ulx showmotd
39 = ulx slap
40 = ulx slay
41 = ulx spawnecho
42 = ulx spectate
43 = ulx sslay
44 = ulx stats
45 = ulx strip
46 = ulx teleport
47 = ulx tsay
48 = ulx unban
49 = ulx unblind
50 = ulx uncloak
51 = ulx unfreeze
52 = ulx ungag
53 = ulx ungimp
54 = ulx ungod
55 = ulx unignite
56 = ulx unigniteall
57 = ulx unjail
58 = ulx unmute
59 = ulx unragdoll
60 = ulx veto
61 = ulx vote
62 = ulx voteban
63 = ulx votebanminvotes
64 = ulx votebansuccessratio
65 = ulx votekick
66 = ulx votekickminvotes
67 = ulx votekicksuccessratio
68 = ulx votemap2
69 = ulx votemap2minvotes
70 = ulx votemap2successratio
71 = ulx votemapenabled
72 = ulx votemapmapmode
73 = ulx votemapmintime
74 = ulx votemapminvotes
75 = ulx votemapsuccessratio
76 = ulx votemapvetotime
77 = ulx votemapwaittime
78 = ulx welcomemessage
79 = ulx whip
inherit_from = operator
usprivate:
allow:
inherit_from = user
trialmod:
can_target = !%trialmod
allow:
inherit_from = user
usspecialist:
allow:
inherit_from = uscorporal
uscaptain:
can_target = #usprivate,#uscorporal,#usspecialist,#ussergeant
allow:
ulx adduser = * usprivate,uscorporal,usspecialist,ussergeant
inherit_from = uslieutenant


ULib.ucl.authed (#=2):
4207479129:
name = Jesus
deny:
allow:
group = headadmin
699454727:
name = Bsharpie™
deny:
allow:
group = owner


Garrysmod default file (#=2):
superadmin:
admin:

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #11 on: January 21, 2016, 06:13:48 PM »
bump?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX adduser command
« Reply #12 on: January 21, 2016, 08:21:59 PM »
Sharpie, don't.
This isn't facepunch. You're post won't get lost in one day.
Pace of life is slow here.
Megiddo barely has time to do real life work, let alone help on the forum.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline bsharpie

  • Newbie
  • *
  • Posts: 15
  • Karma: -4
Re: ULX adduser command
« Reply #13 on: January 21, 2016, 09:00:08 PM »
Well no offence but as you can see I am new around here, I am not active on these forums nor do I know anything about your lives. The way This post was treated yesterday was that megiddo was pretty active. Also aren't you someone who can answer questions as well? (again as you can tell I don't know really anything about these forums so you don't have to sound extra aggravated in your posts) Sorry I didn't know how it works here because i'm not active on this forum next time you could be a little nicer to someone who is new here would be much appreciated

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX adduser command
« Reply #14 on: January 22, 2016, 09:46:28 AM »
bsharpie -- we treat everyone here the same. Don't expect special treatment because you're new.

I see this in your debuginfo:
Code: [Select]
ulx adduser = * <usprivate,uscorporal,usspecialist,ussergeant,uslieutenant,uscaptain>
I'm not sure how you got the '<' and '>'. I replicated some of your structure and when I execute:
Code: [Select]
ulx groupallow usmajor "ulx adduser" "* user,uscaptain"
It works correctly and shows no '<' and '>' in the debug output.

You can also do this from XGUI and it's a lot simpler and more straightforward...

Experiencing God's grace one day at a time.