• Print

Author Topic: Access system  (Read 9 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Access system
« on: October 31, 2006, 08:43:59 pm »
I recently received a suggestion on how to do admin access if we were to redo it. I thought this suggestion was well-thought out and worthy of discussion:

Quote
By the way, if you if you ever plan to work on a new admin mod, I have contemplated a new system for admin checks. I already talked to Cazull about it, and he seems to approve.

Tie into _PlayerInfo(userid,"admin").

There are two uses of this:
_PlayerInfo(userid,"admin") would return a number ranging from 1 thru 10, 10 being comlpete control, 1 being some access. Returning nil means no access. Returning false means muted.

There may be some confusion between nil and false, but the point is being able to do a quick administration check:
ent_access = 4
If _PlayerInfo(userid,"admin") >= ent_access Then

Make sure to have a context panel to adjust all access levels of all mods and a way to save them.


The second use of _PlayerInfo(userid,"admin") uses a third parameter:
_PlayerInfo(userid,"admin","a")
_PlayerInfo(userid,"admin","nuclear")
This system should store the flags delimited by tabs if possible, otherwise, colons. Hence, it would look up ":a" or ":nuclear" to avoid finding "a" in "nuclear" (But the _PlayerInfo search shouldn't require inputting a colon).

_PlayerInfo(userid,"admin")
Returns nil,false,1 thru 10

_PlayerInfo(userid,"admin",string)
Returns true/false


If comparing a number with nil or false completely stops the script (Which I believe it will), return 0 for no admin, -1 for mute. This is probably how it will end up, seems more convenient as well.

The biggest problem with any system, of course, is ease of use. It has to be mind-numbingly simple or people will be confused.

If you could have the admin system anyway you wanted, what would it be?
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Access system
« Reply #1 on: November 01, 2006, 05:16:18 pm »
Difficult for my mind to grasp an entire new system right now.
However, adding/combining some keyword 'standard' access levels in with the current one might be nice.

Example, Windows 2000/XP have 'standard', 'power user', and 'Administrator' in its user profiles.
I think it would be good to have some default words associated with certain levels.
From in game, typing "adduser JamminR root" wouldn't add a,d,m,i,n, but would add abcdefghijkl
Typing "adduser JamminR root" wouldn't add a,d,m,i,n, but would add root minus immune, and one or two others.
"adduser JamminR power" would add flags for kick/ban/slay, but no ent, rcon, immune

You get my general idea now I'm sure.
Oh, in addition, these few keywords would have levels configurable in users.ini perhaps.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print