• Print

Author Topic: [Resolved] ULX Group Ordering Question (By inheritance?)  (Read 15216 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #15 on: October 07, 2016, 12:28:21 pm »
Easiest suggestion - don't get overly one-off.
No, really. Don't try to maintain individuals so much.
We understand wanting to reward participants of your server.
But, plan ahead.
Make a list of groups with certain commands you might want to use as reward later, even if they sit empty for days/weeks/months.
Make a few base groups. You can add a new group later if needed?
What's easier, maintaining 10 groups, and perhaps adding one group in later and having only to re-edit the inheritance and target of 5 other groups, or 20 individuals with various perks single at a time and having to figure out where they are in the inheritance tree?

In rare cases, perhaps allow an individual, or two, within particular groups additional ^ access and track that some way, but, you can already allow groups ^ access, so it would be easier to make a higher group that has ^ access (that sits empty until time needed) than give individuals that access you have to maintain/track later.

You could plan this out on a spreadsheet or other method.
superadmin - everything (unmodified)
admin         - almost everything (unmodified)
almost_admin - a few helpful admin commands, but not as much as admin, inherits below
vip++         - "ulx blah3 ^"
                       ""
                       ""
vip+           - "ulx blah2"
                    ""
vip             - ulx blah
operator     - a default ulx group. not needed, just remember it holds seeasay I think.
respected   - perhaps a few special ^ holders?
user           - gmod default. a few ulx commands provided by default (who, help, few others i now forget)

Hopefully, you get the idea.

Not only would this help you maintain, it would help you explain to your server participants just what it means when they are in "some_name" group.
With your web pages, you can even give a brief synopsis why you might reward/what it takes to earn the respected groups.
« Last Edit: October 07, 2016, 12:31:40 pm by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #16 on: October 09, 2016, 01:33:37 am »
there was a lot of writing after I said what I said, so I skimmed most of it. I'm just going to say that I BELIEVE there is a ulib command called "ulx_allowuser". If you type it in console, I think it uses steamid, etc. Allowuser is a little more complicated, and hard to keep track of since it doesn't prove anything.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #17 on: October 09, 2016, 04:20:05 pm »
Thank you all for the response. It took some time to figure out WHAT I can offer donors as well well how to divy it out properly so as to fit this donor structure to make the groups as simple as possible. It worked out pretty well.

On a related note, but from an unrelated addon, how would I change Tommy's RDM manager to accept Steam IDs rather than ULX groups, similar to EasyScoreboard does it? This also will apply to the Advanced Join/Leave messaging too. Those two addons are the only ones I find myself incapable of avoiding unique identifiers for each user.
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #18 on: October 10, 2016, 06:47:11 am »
It doesn't look like TTTDamageLogs has a way for you to give access to certain users. However, it doesn't seem like it would be too difficult to add said functionality.

Replacing the end of TTTDamagelogs/lua/damagelogs/sh_privileges.lua with the following code:

Code: Lua
  1. function meta:CanUseDamagelog()
  2.         for k,v in pairs(Damagelog.User_rights) do
  3.                 if self:IsUserGroup(k) or self:SteamID() == k then
  4.                         return checkSettings(self, v)
  5.                 end
  6.         end
  7.         return checkSettings(self, 2)
  8. end
  9.  
  10. function meta:CanUseRDMManager()
  11.         for k,v in pairs(Damagelog.RDM_Manager_Rights) do
  12.                 if self:IsUserGroup(k) or self:SteamID() == k then
  13.                         return v
  14.                 end
  15.         end
  16.         return false
  17. end

should allow you to give users access like so:

Code: Lua
  1. Damagelog:AddUser("STEAM_0:1:58625774", 4, true)
  (this would go in TTTDamagelogs/lua/config/config.lua)

I haven't tested this code, so let me know if there are any errors or if it doesn't work as expected.
« Last Edit: October 10, 2016, 06:48:49 am by roastchicken »
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 allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #19 on: October 11, 2016, 10:05:15 pm »
Gave it a try with a server reboot, and removing myself from all ULX groups to no avail.

No errors, and nothing is broken. I can still access logs as I normally would even with your adjusted code. It's just when I remove myself from 'owner' I can't see active round logs, which I should as per your suggestion.

« Last Edit: October 12, 2016, 08:11:56 am by allofmywutsteam »
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #20 on: October 12, 2016, 11:47:16 am »
Hmm, that's strange. I'll have to do some testing on my own to figure out why it's not working. Did you restart the server or change the map after changing and saving the config.lua file?
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 allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
Re: [Resolved] ULX Group Ordering Question (By inheritance?)
« Reply #21 on: October 12, 2016, 01:04:33 pm »
Complete reboot
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

  • Print