Raised This Month: $ Target: $400
 0% 

Command Groups


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-18-2016 , 21:22   Command Groups
Reply With Quote #1

I'm having a hard time getting command group overrides to work.

For example, my plugin here has 10 commands that do not specify a command group. According to the RegAdminCmd documentation, not specifying a group will cause the plugin's filename to be used as the group, which is fine.

When putting these into my overrides:


PHP Code:
Overrides
{
     
"@coordinatePrinter" "z"
     "@plugins/coordinatePrinter.smx" "z"
     "@plugins/coordinatePrinter" "z"
     "@coordinatePrinter.smx" "z"

... the commands are still public. None of these four are working.

Calling GetCommandOverride using these four listed group overrides returns the correct information... it's just not actually blocking command use to people who don't have the Z flag.

Further, manually specifying the group in the appropriate argument of RegAdminCmd doesn't seem to solve this issue.

what do wrong
__________________
ddhoward is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 07-19-2016 , 00:34   Re: Command Groups
Reply With Quote #2

Out of curiosity, does it work if you use one of these as an override?

"coordinateprinter" "z"
"sm_coordinateprinter" "z"
"sm_coordinates" "z"


I've never seen or used the @ in the overrides file.
PC Gamer is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-19-2016 , 00:37   Re: Command Groups
Reply With Quote #3

The documentation found at the top of the overrides file says to use a @ symbol.

PHP 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.
     */

As stated above, the following functions all return the expected values, and place the expected int into someVar. This indicates that the @ is functioning as it should. The issue seems to be that commands are not being placed into the appropriate command groups.

PHP Code:
GetCommandOverride("coordinatePrinter"Override_CommandGroupsomeVar);
GetCommandOverride("plugins/coordinatePrinter.smx"Override_CommandGroupsomeVar);
GetCommandOverride("plugins/coordinatePrinter"Override_CommandGroupsomeVar);
GetCommandOverride("coordinatePrinter.smx"Override_CommandGroupsomeVar); 
__________________

Last edited by ddhoward; 07-19-2016 at 00:52.
ddhoward 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 22:05.


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