Raised This Month: $51 Target: $400
 12% 

One flag multiple groups (Overrides)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Scipio
Junior Member
Join Date: Sep 2008
Old 10-01-2008 , 02:03   One flag multiple groups (Overrides)
Reply With Quote #1

Hey,

Is it possible to create different override groups with the same flag with additional abilities?

What I have done is created three different custom flags (V,W,X) but I'd like to have one flag and add one or two abilities to the second and third group. Basically I want a step-up series of groups with more and more capabilities. I've read the documentation but can't figure it out if it's possible.

Thanks for any help.
Scipio is offline
necrosect
Senior Member
Join Date: Jun 2008
Old 10-01-2008 , 07:55   Re: One flag multiple groups (Overrides)
Reply With Quote #2

I'm not sure exactly what you're trying to do, it sounds like you're trying to get two different groups of people with the same flags to have different access? Is that right?
necrosect is offline
Scipio
Junior Member
Join Date: Sep 2008
Old 10-01-2008 , 21:24   Re: One flag multiple groups (Overrides)
Reply With Quote #3

Yeah that's what I'm wanting to do, what I've set-up so far is three custom flags but I want to add more privileges and so expand my override groups. I'm thinking of having maybe six or seven VIP groups of privileges and ten Admin groups, but using a custom flag for each will mean I'll run out of letters to use. Is there a way of using admin_groups.cfg to use just a few custom flags and use the "allow" function to add one or two more abilities. From what I can work out from the documentation each group is for a single SteamID, can multiple SteamIDs be added to one group?

Here's what I've done so far, but it would be good to use one flag for VIPs & one for Admins and just add more abilities with the "allow" function:

Code:
Overrides
{
    /**
     * By default, commands are registered with three pieces of information:
     * 1)Command Name         (for example, "csdm_enable")
     * 2)Command Group Name    (for example, "CSDM")
     * 3)Command Level        (for example, "changemap")
     *
     * You can override the default flags assigned to individual commands or command groups in this way.
     * To override a group, use the "@" character before the name.  Example:
     * Examples:
     *        "@CSDM"            "b"                // Override the CSDM group to 'b' flag
     *         "csdm_enable"    "bgi"            // Override the csdm_enable command to 'bgi' flags
     *
     * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
     * any setting that csdm_enable previously had.
     *
     * You can make a command completely public by using an empty flag string.
     */
}
V Flag
{
    "sm_showrules_showtoadmins"        "bv"    //Change "sm_showrules_showtoadmins" to the "v" flag as well.
    "sm_adminsimmune"                "bv"    //Change "sm_adminsimmune" to the "v" flag as well.
    "sm_psay"                    "jv"    //Change "sm_psay" to the "v" flag as well.
}
W Flag
{
    "sm_showrules_showtoadmins"        "bw"    //Change "sm_showrules_showtoadmins" to the "w" flag as well.
    "sm_adminsimmune"                "bw"    //Change "sm_adminsimmune" to the "w" flag as well.
    "sm_psay"                    "jw"    //Change "sm_psay" to the "w" flag as well.
    "sm_votemute"                "bw"    //Change "sm_votemute" to the "w" flag as well.
    "sm_votesilence"                "bw"    //Change "sm_votesilence" to the "w" flag as well.
}
X Flag
{
    "sm_showrules_showtoadmins"        "bx"    //Change "sm_showrules_showtoadmins" to the "x" flag as well.
    "sm_adminsimmune"                "bx"    //Change "sm_adminsimmune" to the "x" flag as well.
    "sm_psay"                    "jx"    //Change "sm_psay" to the "x" flag as well.
    "sm_votemute"                "bx"    //Change "sm_votemute" to the "x" flag as well.
    "sm_votesilence"                "bx"    //Change "sm_votesilence" to the "x" flag as well.
    "sm_votekick"                "kx"    //Change "sm_votekick" to the "x" flag as well.
    "sm_voteban"                "kx"    //Change "sm_voteban" to the "x" flag as well.
}
Code:
//
// READ THIS CAREFULLY! SEE BOTTOM FOR EXAMPLES
//
// For each admin, you need three settings:
//  "identity"        "permissions"        "password"
//
// For the Identity, you can use a SteamID or Name.  To use an IP address, prepend a ! character.
// For the Permissions, you can use a flag string and an optional password.
//
// PERMISSIONS:
//  Flag definitions are in "admin_levels.cfg"
//  You can combine flags into a string like this:
//  "abcdefgh"
//
//  If you want to specify a group instead of a flag, use an @ symbol.  Example:
//  "@Full Admins"
//
//    You can also specify immunity values.  Two examples:
//    "83:abcdefg"            //Immunity is 83, flags are abcefgh
//    "6:@Full Admins"        //Immunity is 6, group is "Full Admins"
//
//    Immunity values can be any number.  An admin cannot target an admin with 
//    a higher access value (see sm_immunity_mode to tweak the rules).  Default 
//  immunity value is 0 (no immunity).
//
// PASSWORDS:
//  Passwords are generally not needed unless you have name-based authentication.
//  In this case, admins must type this in their console:
//
//   setinfo "KEY" "PASSWORD"
//
//  Where KEY is the "PassInfoVar" setting in your core.cfg file, and "PASSWORD"
//  is their password.  With name based authentication, this must be done before
//  changing names or connecting.  Otherwise, SourceMod will automatically detect
//  the password being set.
//
////////////////////////////////
// Examples: (do not put // in front of real lines, as // means 'comment')
//
//   "STEAM_0:1:16"        "bce"                //kick, ban, slay for this steam ID, no immunity
//   "!127.0.0.1"        "99:z"                //all permissions for this ip, immunity value is 99
//   "BAILOPAN"            "abc"    "Gab3n"        //name BAILOPAN, password "Gab3n": gets reservation, kick, ban
//
////////////////////////////////

"STEAM_0:0:00000"        "100:z"                // Root Admin
"STEAM_0:0:00000"        "1:v"                // V.I.P. Basic
"STEAM_0:0:00000"        "1:w"                // V.I.P. Standard
"STEAM_0:0:00000"        "1:x"                // V.I.P. Advanced
Scipio is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 10-01-2008 , 21:48   Re: One flag multiple groups (Overrides)
Reply With Quote #4

This should do the same thing:

(Note: VWX are not valid flags i don't think, so i used opq instead. [Valid flags are a-t])

Code:
Overrides
{
    /**
     * By default, commands are registered with three pieces of information:
     * 1)Command Name         (for example, "csdm_enable")
     * 2)Command Group Name    (for example, "CSDM")
     * 3)Command Level        (for example, "changemap")
     *
     * You can override the default flags assigned to individual commands or command groups in this way.
     * To override a group, use the "@" character before the name.  Example:
     * Examples:
     *        "@CSDM"            "b"                // Override the CSDM group to 'b' flag
     *         "csdm_enable"    "bgi"            // Override the csdm_enable command to 'bgi' flags
     *
     * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
     * any setting that csdm_enable previously had.
     *
     * You can make a command completely public by using an empty flag string.
     */

    "sm_showrules_showtoadmins"        "o"    //Change "sm_showrules_showtoadmins" to the "o" flag as well.
    "sm_adminsimmune"                "o"    //Change "sm_adminsimmune" to the "o" flag as well.
    "sm_psay"                    "o"    //Change "sm_psay" to the "o" flag as well.

    "sm_votemute"                "p"    //Change "sm_votemute" to the "p" flag as well.
    "sm_votesilence"                "p"    //Change "sm_votesilence" to the "p" flag as well.

    "sm_votekick"                "q"    //Change "sm_votekick" to the "q" flag as well.
    "sm_voteban"                "q"    //Change "sm_voteban" to the "q" flag as well.
}
Code:
//
// READ THIS CAREFULLY! SEE BOTTOM FOR EXAMPLES
//
// For each admin, you need three settings:
//  "identity"        "permissions"        "password"
//
// For the Identity, you can use a SteamID or Name.  To use an IP address, prepend a ! character.
// For the Permissions, you can use a flag string and an optional password.
//
// PERMISSIONS:
//  Flag definitions are in "admin_levels.cfg"
//  You can combine flags into a string like this:
//  "abcdefgh"
//
//  If you want to specify a group instead of a flag, use an @ symbol.  Example:
//  "@Full Admins"
//
//    You can also specify immunity values.  Two examples:
//    "83:abcdefg"            //Immunity is 83, flags are abcefgh
//    "6:@Full Admins"        //Immunity is 6, group is "Full Admins"
//
//    Immunity values can be any number.  An admin cannot target an admin with
//    a higher access value (see sm_immunity_mode to tweak the rules).  Default
//  immunity value is 0 (no immunity).
//
// PASSWORDS:
//  Passwords are generally not needed unless you have name-based authentication.
//  In this case, admins must type this in their console:
//
//   setinfo "KEY" "PASSWORD"
//
//  Where KEY is the "PassInfoVar" setting in your core.cfg file, and "PASSWORD"
//  is their password.  With name based authentication, this must be done before
//  changing names or connecting.  Otherwise, SourceMod will automatically detect
//  the password being set.
//
////////////////////////////////
// Examples: (do not put // in front of real lines, as // means 'comment')
//
//   "STEAM_0:1:16"        "bce"                //kick, ban, slay for this steam ID, no immunity
//   "!127.0.0.1"        "99:z"                //all permissions for this ip, immunity value is 99
//   "BAILOPAN"            "abc"    "Gab3n"        //name BAILOPAN, password "Gab3n": gets reservation, kick, ban
//
////////////////////////////////

"STEAM_0:0:00000"        "100:z"                // Root Admin
"STEAM_0:0:00000"        "1:o"                // V.I.P. Basic
"STEAM_0:0:00000"        "1:op"                // V.I.P. Standard
"STEAM_0:0:00000"        "1:opq"                // V.I.P. Advanced
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
Scipio
Junior Member
Join Date: Sep 2008
Old 10-03-2008 , 22:48   Re: One flag multiple groups (Overrides)
Reply With Quote #5

Quote:
Originally Posted by Lebson506th View Post
This should do the same thing:

(Note: VWX are not valid flags i don't think, so i used opq instead. [Valid flags are a-t])

[...]
Thanks Lebson506th I tested that and works great. If I use Admin Groups can I use just one flag (I changed all to q in admin_overrides.cfg) and use the "[allow|deny]" to reduce the command access:

Code:
Groups
{
    /**
     * Allowed properties for a group:
     *
     *   "flags"           - Flag string.
     *   "immunity"        - Immunity level number, or a group name.
     *                         If the group name is a number, prepend it with an 
     *                         '@' symbol similar to admins_simple.ini.  Users 
     *                         will only inherit the level number if it's higher 
     *                         than their current value.
     */
    "Default"
    {
        "immunity"        "1"
    }
    
    "V.I.P. Basic"
    {
         "flags"            "q"
         "immunity"            "1"
         /* ... */
         Overrides
         {
         }
            "sm_votemute"        "deny"
            "sm_votesilence"        "deny"
            "sm_votekick"        "deny"
            "sm_voteban"        "deny"
            /* ... */
    }
    "V.I.P. Standard"
    {
         "flags"            "q"
         "immunity"            "1"
         /* ... */
         Overrides
         {
         }
            "sm_votemute"        "allow"
            "sm_votesilence"        "allow"
            "sm_votekick"        "deny"
            "sm_voteban"        "deny"
            /* ... */
    }
    "V.I.P. Advanced"
    {
         "flags"            "q"
         "immunity"            "1"
         /* ... */
        }
    }
}
And use the admin.cfg to add the SteamIDs of the players:

Code:
/**
 * USE THIS SECTION TO DECLARE DETAILED ADMIN PROPERTIES.
 *
 * Each admin should have its own "Admin" section, followed by a name.
 * The name does not have to be unique.
 *
 * Available properties: (Anything else is filtered as custom)
 *      "auth"          - REQUIRED - Auth method to use.  Built-in methods are:
 *                        "steam"  - Steam based authentication
 *                        "name"   - Name based authentication
 *                        "ip"    - IP based authentication
 *                        Anything else is treated as custom.
 *                     Note: Only one auth method is allowed per entry.
 *
 *      "identity"      - REQUIRED - Identification string, for example, a steamid or name.
 *                     Note: Only one identity is allowed per entry.
 *
 *      "password"      - Optional password to require.
 *      "group"         - Adds one group to the user's group table.
 *      "flags"         - Adds one or more flags to the user's permissions.
 *        "immunity"        - Sets the user's immunity level (0 = no immunity).
 *                          Immunity can be any value.  Admins with higher 
 *                          values cannot be targetted.  See sm_immunity_mode 
 *                          to tweak the rules.  Default value is 0.
 *
 * Example:
    "BAILOPAN"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:1:16"
        "flags"            "abcdef"
    }
 *
 */
"V.I.P. Basic"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:1:17044902"
        "flags"            ""
        "immunity"            "1"
        "group"        "V.I.P. Basic"
    }
"V.I.P. Standard"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:0:00000"
        "flags"            ""
        "immunity"            "1"
        "group"        "V.I.P. Standard"
    }
"V.I.P. Advanced"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:0:00000"
        "flags"            ""
        "immunity"            "1"
        "group"        "V.I.P. Advanced"
    }
Admins
{
}
I tried those Configs and got this error:

Code:
L 10/04/2008 - 11:14:10: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_groups.cfg
L 10/04/2008 - 11:14:10: [admin-flatfile.smx]  (line 52) Section ending without a matching section beginning
L 10/04/2008 - 11:14:10: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_groups.cfg
L 10/04/2008 - 11:14:10: [admin-flatfile.smx]  (line 52) Section ending without a matching section beginning
L 10/04/2008 - 11:14:10: [basecommands.smx]
It didn't work and I'm not sure what I've done wrong, line 52 seems to be done the same as the example given in the original config file.
Scipio is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 10-03-2008 , 23:44   Re: One flag multiple groups (Overrides)
Reply With Quote #6

In the second one, everything you put should be within the { } after Admins


Also, the title of each block should be the person's name.

Each one of those blocks is for a different admin.
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
Scipio
Junior Member
Join Date: Sep 2008
Old 10-04-2008 , 00:15   Re: One flag multiple groups (Overrides)
Reply With Quote #7

Quote:
Originally Posted by Lebson506th View Post
In the second one, everything you put should be within the { } after Admins

Also, the title of each block should be the person's name.

Each one of those blocks is for a different admin.
Ok so the first config (admin_groups) needs to have the "allow deny" between the "{":

Code:
Groups
{
    /**
     * Allowed properties for a group:
     *
     *   "flags"           - Flag string.
     *   "immunity"        - Immunity level number, or a group name.
     *                         If the group name is a number, prepend it with an 
     *                         '@' symbol similar to admins_simple.ini.  Users 
     *                         will only inherit the level number if it's higher 
     *                         than their current value.
     */
    "Default"
    {
        "immunity"        "1"
    }
    "V.I.P. Basic"
    {
         "flags"            "q"
         "immunity"            "1"
         /* ... */
         Overrides
        {
             "sm_votemute"        "deny"
            "sm_votesilence"        "deny"
            "sm_votekick"        "deny"
            "sm_voteban"        "deny"
            /* ... */
        }
    }
    "V.I.P. Standard"
    {
         "flags"            "q"
         "immunity"            "1"
         /* ... */
         Overrides
        {
            "sm_votemute"        "allow"
            "sm_votesilence"        "allow"
            "sm_votekick"        "deny"
            "sm_voteban"        "deny"
            /* ... */
        }
    }
    "V.I.P. Advanced"
    {
         "flags"            "q"
         "immunity"            "1"
        {
            /* ... */
        }
    }
}
And admins.cfg needs to be like this:

Code:
/**
 * USE THIS SECTION TO DECLARE DETAILED ADMIN PROPERTIES.
 *
 * Each admin should have its own "Admin" section, followed by a name.
 * The name does not have to be unique.
 *
 * Available properties: (Anything else is filtered as custom)
 *      "auth"          - REQUIRED - Auth method to use.  Built-in methods are:
 *                        "steam"  - Steam based authentication
 *                        "name"   - Name based authentication
 *                        "ip"    - IP based authentication
 *                        Anything else is treated as custom.
 *                     Note: Only one auth method is allowed per entry.
 *
 *      "identity"      - REQUIRED - Identification string, for example, a steamid or name.
 *                     Note: Only one identity is allowed per entry.
 *
 *      "password"      - Optional password to require.
 *      "group"         - Adds one group to the user's group table.
 *      "flags"         - Adds one or more flags to the user's permissions.
 *        "immunity"        - Sets the user's immunity level (0 = no immunity).
 *                          Immunity can be any value.  Admins with higher 
 *                          values cannot be targetted.  See sm_immunity_mode 
 *                          to tweak the rules.  Default value is 0.
 *
 * Example:
    "BAILOPAN"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:1:16"
        "flags"            "abcdef"
    }
 *
 */
    "Scipio"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:1:17044902"
        "flags"            ""
        "immunity"            "1"
        "group"        "V.I.P. Basic"
    }
Admins
{
}
Thanks again, now I think I'm getting it, I'll test that tomorrow morning.
Scipio is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 10-04-2008 , 00:37   Re: One flag multiple groups (Overrides)
Reply With Quote #8

First file is mostly right. Just change the last part to this: [The { /**/ } part was not needed if there were no overrides]

Code:
    "V.I.P. Advanced"
    {
         "flags"            "q"
         "immunity"            "1"
    }

Second file should be like this:

Code:
/**
 * USE THIS SECTION TO DECLARE DETAILED ADMIN PROPERTIES.
 *
 * Each admin should have its own "Admin" section, followed by a name.
 * The name does not have to be unique.
 *
 * Available properties: (Anything else is filtered as custom)
 *      "auth"          - REQUIRED - Auth method to use.  Built-in methods are:
 *                        "steam"  - Steam based authentication
 *                        "name"   - Name based authentication
 *                        "ip"    - IP based authentication
 *                        Anything else is treated as custom.
 *                     Note: Only one auth method is allowed per entry.
 *
 *      "identity"      - REQUIRED - Identification string, for example, a steamid or name.
 *                     Note: Only one identity is allowed per entry.
 *
 *      "password"      - Optional password to require.
 *      "group"         - Adds one group to the user's group table.
 *      "flags"         - Adds one or more flags to the user's permissions.
 *        "immunity"        - Sets the user's immunity level (0 = no immunity).
 *                          Immunity can be any value.  Admins with higher 
 *                          values cannot be targetted.  See sm_immunity_mode 
 *                          to tweak the rules.  Default value is 0.
 *
 * Example:
    "BAILOPAN"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:1:16"
        "flags"            "abcdef"
    }
 *
 */
Admins
{
    "Scipio"
    {
        "auth"            "steam"
        "identity"        "STEAM_0:1:17044902"
        "flags"            ""
        "immunity"            "1"
        "group"        "V.I.P. Basic"
    }

}
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
Scipio
Junior Member
Join Date: Sep 2008
Old 10-04-2008 , 01:17   Re: One flag multiple groups (Overrides)
Reply With Quote #9

Ok now I see, thanks heaps.
Scipio is offline
Scipio
Junior Member
Join Date: Sep 2008
Old 10-05-2008 , 22:21   Re: One flag multiple groups (Overrides)
Reply With Quote #10

Tested this and it's working perfectly, thank you Lebson506th. Also I'm trying to figure out how to change so Admins with the same immunity cannot to target each other, the documentation states:

Quote:
Originally Posted by SourceMod Doc
By default, admins with the same immunity value can target each other. This can be changed via sm_immunity_mode in cfg/sourcemod.cfg.
I have no sourcemod.cfg, should I create one and what should I put in there, sm_immunity_mode 0 ?
Scipio is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode