Clan x86

Technical (Development, Security, etc.) => General Programming => Botdev => Topic started by: Net_Creator on April 22, 2008, 11:08:37 PM

Title: User Groups
Post by: Net_Creator on April 22, 2008, 11:08:37 PM
OK, I'm definitely no Java scripter, so the most I can do is post my formed idea here, and anyone who wants to can try to make it. (Exactly as said. Whoever wants to.)

User Groups.

Usergroups will probably be an even easier and more organized form of accesslevels. With the usergroups, I'd suggest having a pre-defined usergroup: all. No flags, but some way it includes anyone. This can be used for setting everyone to a certain flag.
For instance, you make a command. You want everyone to be able to use it. Set the command to that flag. Set the all usergroup to that flag. I'd also recommend making a block against deleting the all usergroup, if it's possible to be made.
A few script-mods may also be helpful to do. Such as, when using find or whoami, it will list which usergroup you're in if you are in one, after the flags you have.

User groups can be defined with /addusergroup <newusergroupname> <newusergroupflags>
You can redefine already-made usergroups with /setusergroup <usergroupname> <usergroupflags>
Deleting usergroups is just as easy. Use a /deleteusergroup <usergroupname> to remove it.
Players can be added to usergroups with /addtogroup <usergroupname> <username>
Likewise, players can be removed with /deletefromgroup <username>

I had more ideas on this, but they seem to have slipped my mind, and elude me at the moment. I'll edit this post as I remember more things, or post again. >_>
Title: Re: User Groups
Post by: rabbit on April 23, 2008, 08:08:14 AM
What you suggested already exists: flags.
To make an "all" group, just /add * FLAG
Title: Re: User Groups
Post by: warz on April 23, 2008, 09:49:39 AM
groups have also existed at one point, also. one of c0ol's bots used to have usergroups, and so did nbbot i think.
Title: Re: User Groups
Post by: iago on April 23, 2008, 09:55:33 AM
role-based management would be cool. :)
Title: Re: User Groups
Post by: Net_Creator on April 23, 2008, 02:07:30 PM
Hrm.. Well, this changes my question. When using an access level on a person, if they don't have any flags, why will their flags not change instead of using the access level's flags? Shouldn't it change to the flags set by the access level instead of toggling, also?
Title: Re: User Groups
Post by: Newby on April 23, 2008, 03:17:16 PM
So, from point A to point B directly, a usergroup would be an alias for a bunch of flags?

/addusergroup groupname FLAGS

/addusertogroup username groupname

Would be the same as:

/adduser username FLAGS

A question: how would you deal with overlapping flags? Say groupA has flags ABC, and groupB has CDE.

This method of access doesn't seem any more different than flags or numbers, for that matter...
Title: Re: User Groups
Post by: warz on April 23, 2008, 04:01:13 PM
eh, it'd just be better to have a copy flags command. copy flags from user a to user b.
Title: Re: User Groups
Post by: Net_Creator on April 23, 2008, 05:00:15 PM
@Newby: Yes, basically. Say I have a have a set of flags for masters, and take someone straight from no flags to that. Accesslevel won't do it, unless I give them a flag, give them the access level, then give them back the flag, and flags has me manually type in my flags. Say, I have the following flag combinations:
master          ACDEFGHIJKLMNOPQRSTUVWXY
admin           AFLNSTU
member        FU
other            LSTU
other-low      LU
Some of these would be fine to just manually type in really quickly. Others would be a pain. And I'm just horrible at remembering all these combinations. >_> I found that usergroups might make it easier, or might make it harder. Knowing how to mod my plugin for access levels, so instead of toggling, it will set the users exactly to those specified flags, or using + and then an access level, or - then an access level, to add or remove that level's flags, could replace this idea.
Dealing with overlapping flags? It would just give that member the flag. It would give it again, and since there's two (or more), a little process would change this, so if it is the case, the flag will be processed for modification - then setting it back to only one of that same flag on the user. An example for a user in 'member' and 'other' usergroups:
/whois *MyGenericPerson@Azeroth
*MyGenericPerson@Azeroth has flags FLSTU (In usergroups member and other)

Basically. Also, did I miss anything?
Title: Re: User Groups
Post by: Joe on April 26, 2008, 12:40:19 AM
Stealthbot Beta has this system. Basically, it combines all the flags that you have for your clan, your group, and your as an individual, as well as your highest access.

For example:
User Joe[x86]@USEast, Clan BoT, group Operator
Joe[x86]@USEast, 0 access, blank flags
Clan BoT, 20 access, flags S
Operator group, 200 access, flags A

I'd effectively have 200 access and flags SA.

I have a feeling that's what the guy above said, though. :P