Raised This Month: $32 Target: $400
 8% 

sm_cancelvote and admin_overrides


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-15-2010 , 01:38   sm_cancelvote and admin_overrides
Reply With Quote #1

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?

Last edited by Powerlord; 02-15-2010 at 01:41.
Powerlord is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-15-2010 , 05:33   Re: sm_cancelvote and admin_overrides
Reply With Quote #2

First of all
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 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 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

Last edited by Bacardi; 11-03-2010 at 16:19.
Bacardi is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-15-2010 , 05:45   Re: sm_cancelvote and admin_overrides
Reply With Quote #3

Sorry douple post !!
Quote:
Originally Posted by Powerlord View Post
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 View Post
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"
    }
}
__________________
Do not Private Message @me
Bacardi is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-15-2010 , 14:45   Re: sm_cancelvote and admin_overrides
Reply With Quote #4

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.
Powerlord is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-05-2012 , 19:21   Re: sm_cancelvote and admin_overrides
Reply With Quote #5

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).
__________________

Last edited by Dr. McKay; 05-05-2012 at 19:22.
Dr. McKay is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-06-2012 , 02:01   Re: sm_cancelvote and admin_overrides
Reply With Quote #6

woh... would those my post even correct after few years ^^
Didn't know much at that time....
Bacardi 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 19:42.


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