AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   sm_cancelvote and admin_overrides (https://forums.alliedmods.net/showthread.php?t=118839)

Powerlord 02-15-2010 01:38

sm_cancelvote and admin_overrides
 
Hi all,

Before I explain my problem, I'm going to note that I'm running Metamod Source 1.8 and Sourcemod 1.3.

In admin_overrides.cfg, my servers have
"sm_cancelvote" "v"

Result: Admins in a group with flags "abprtu" can still use !cancelvote

So, I added an override to the same admin group in my admin_groups.cfg:
Overrides
{
"sm_cancelvote" "deny"
}

Result: Admins in this group can still use !cancelvote

Is there somewhere else that could be overriding these settings, or is this a Sourcemod bug?

Bacardi 02-15-2010 05:33

Re: sm_cancelvote and admin_overrides
 
First of all:rtfm:
SourceMod adminflags:
Admin flags = abcdefghijklmn
custom flags = opqrst
Magically enables all flags = z


There is no flags "u" "v". If you add those letter, they are same as "" (no-flag).

What you did :arrow: you added no-flag in admin_overrides.cfg
"sm_cancelvote" "v"
This why they can cancelvote and whole server, public players can use also (non-flaged players) :)
You made accidentally sm_cancelvote to public command.

If you add flag="u" to admins/group, server get errors to SourceMod logs
Code:

L 02/15/2010 - 10:54:06: SourceMod error session started
L 02/15/2010 - 10:54:06: Info (map "cs_office") (file "errors_20100215.log")
L 02/15/2010 - 10:54:06: [admin-flatfile.smx] Error(s) detected parsing addons\sourcemod\configs\admins.cfg
L 02/15/2010 - 10:54:06: [admin-flatfile.smx]  (line 42) Invalid flag detected: u
L 02/15/2010 - 10:54:16: Error log file session closed.

*edit
add more adminflags go edit
...addons\sourcemod\configs\admin_levels.cfg



How override command to other flag and disabled to group :!:
basecommands.smx
ADMFLAG_VOTE, "sm_cancelvote" = "k"
Is original flag, built in plugin.

Example 1:
You want change sm_cancelvote flag to customflag = q
in ...addons\sourcemod\configs\admin_overrides.c fg
(I erase guidelines/description to short code)
Code:

Overrides
{
        "sm_cancelvote"        "q"
}

  • Now Admins flagged "k" can't access this command anymore
  • Admins flagged "q" can access this command now
  • Admins added group "Group allow command"(Example 3) can access this command now, even admins flagged ="k"(admin_simple.ini or admins.cfg)




Example 2:
You want deny sm_cancelvote from group (nothing has been added to admin_overrides.cfg)
in ...addons\sourcemod\configs\admin_groups.cfg
(I erase guidelines/description to short code)
Code:

Groups
{
    "Group deny command"
    {
        Overrides
        {
        "sm_cancelvote"        "deny"
        }
        "flags"            "abk"
        "immunity"        "5"
    }
}

  • Now every player who have added this group "Group deny command" can't access this command anymore, even admins flagged="k"(admin_simple.ini or admins.cfg)
  • Admins flagged "k" can access this command, if not added this group.




Example 3:
You want change sm_cancelvote flag to customflag = q
Do :arrow: Example 1
You want allow sm_cancelvote to specified players
in ...addons\sourcemod\configs\admin_groups.cfg
(I erase guidelines/description to short code)
Code:

Groups
{
    "Group allow command"
    {
        Overrides
        {
        "sm_cancelvote"        "allow"
        }
        "flags"            "abk"
        "immunity"        "5"
    }
}

  • Now every player who have added this group "Group allow command" can access this command, even admins not flagged="q"(admin_simple.ini or admins.cfg)
  • Admins flagged "k" can't access this command, if not added this group.
  • Admins flagged "q" can access this command now


Admins flagged = "z" can't be override (deny/allow) commands. He is GOD.
Not affect admin_groups.cfg and admin_overrides.cfg

Bacardi 02-15-2010 05:45

Re: sm_cancelvote and admin_overrides
 
Sorry douple post !!
Quote:

Originally Posted by Powerlord (Post 1089295)
In admin_overrides.cfg, my servers have
"sm_cancelvote" "v"

Result: Admins in a group with flags "abprtu" can still use !cancelvote

Erase that "sm_cancelvote" "v"
and remove flag-"u", there is no those letters use in SourceMod
Quote:

Originally Posted by Powerlord (Post 1089295)
So, I added an override to the same admin group in my admin_groups.cfg:
Overrides
{
"sm_cancelvote" "deny"
}

You don't need "deny" command if not added "k"-flag in group.


But if you start change sm_cancelvote flag
- Add right letter in admin_overrides.cfg (abcdefghijklmnopqrst z)
- And if group have also same flag what you have change, make correct code.
admin_groups.cfg
Code:

Groups
{
    "Group name"
    {
        Overrides
        {
        "sm_cancelvote"        "deny"
        }
        "flags"            "abprt"
        "immunity"        "5"
    }
}


Powerlord 02-15-2010 14:45

Re: sm_cancelvote and admin_overrides
 
OK, I'll change it to another flag. I'm not the admin who originally set it up, and I just assumed they knew what they were doing when inventing new flags.

Dr. McKay 05-05-2012 19:21

Re: sm_cancelvote and admin_overrides
 
I find this thread amusing. Powerlord and Bacardi, two people who always give advice on scripting questions.

Yes, I realize this was a necro. Couldn't help it. Found this after Gooogling admin_overrides.cfg (to make sure I had the filename right).

Bacardi 05-06-2012 02:01

Re: sm_cancelvote and admin_overrides
 
woh... would those my post even correct after few years ^^
Didn't know much at that time....


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

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