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

[ANY] Plugin Categories (2013/6/24)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
necavi
Veteran Member
Join Date: Sep 2010
Plugin ID:
2834
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A replacement for the sm plugins list command that supports categories.
    Old 03-11-2012 , 18:53   [ANY] Plugin Categories (2013/6/24)
    Reply With Quote #1

    As per a discussion in #sourcemod a few days ago, I am pleased to introduce Plugin Categories! This first version doesn't support as much as I'd like (I'll likely be modifying it to be tags rather than categories later), but is still rather useful!

    This plugin adds:
    1.) A command: sm_plugins_list which supports these categories by default: all (which displays all plugins, regardless of category) and misc (which displays all plugins in the main folder).
    2.) A command: sm_list_categories which lists all current categories, including built-ins.
    3.) A cvar: pluginlist_enabled.

    v1.1
    - Fixed handle leak in BuildPluginList
    - Added version cvar

    Categories are set by the folder the plugin is in.
    Note: This was something I just quickly whipped up, there will likely be bugs, issues, and the code is not incredibly optimized (although in this case that isn't as much of an issue)
    Attached Files
    File Type: sp Get Plugin or Get Source (plugin_cats.sp - 731 views - 4.5 KB)

    Last edited by necavi; 06-24-2013 at 12:49.
    necavi is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 03-11-2012 , 19:51   Re: Plugin Categories
    Reply With Quote #2

    Were you planning on providing a set of enum'd categories? Or was your intention that each plugin could name its own category?

    BTW, I like this
    __________________
    View my Plugins | Donate
    TnTSCS is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 03-11-2012 , 19:59   Re: Plugin Categories
    Reply With Quote #3

    Every plugin can name its own category, due to different plugin's needs.
    necavi is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 03-11-2012 , 20:27   Re: Plugin Categories
    Reply With Quote #4

    But then that would be the same thing as having a normal plugin list, because every single plugin might end up having a different category and there would be no point in "categorizing" them.
    I would recommend using the list here in the category section.
    minimoney1 is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 03-11-2012 , 20:36   Re: Plugin Categories
    Reply With Quote #5

    I have thought of that, and adding a standardized list, but the primary purpose behind this plugin was use with massive plugin sets, such as my own classmod, or War3Source.

    Also: Added a command to list all current categories.
    necavi is offline
    Stinkyfax
    BANNED
    Join Date: Aug 2007
    Old 03-11-2012 , 21:13   Re: Plugin Categories
    Reply With Quote #6

    My suggestions on improving:
    1. As mentioned, have general categories if possible
    2. Make plugin automatically categorize if all "those" plugins are in folder, like SourceIRC modules being in plugins/SourceIRC
    3. ???
    4. Get this code included into standard SM
    Stinkyfax is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 03-11-2012 , 21:28   Re: Plugin Categories
    Reply With Quote #7

    As per Stinkyfax's recommendation it now automatically attempts to set the plugin's foldername as its category.
    necavi is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 03-15-2012 , 08:02   Re: Plugin Categories
    Reply With Quote #8

    Update: Removed the SetPluginCategory native due to the lack of a proper plugin load/unload detection event. (may re-add it later in some form).
    necavi is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 03-15-2012 , 17:22   Re: Plugin Categories
    Reply With Quote #9

    so where's the "plugin_cat.inc"?
    Leonardo is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 03-15-2012 , 20:20   Re: Plugin Categories
    Reply With Quote #10

    My apologies, I uploaded a version that still required the include, that is no longer the case.
    necavi is offline
    Reply


    Thread Tools
    Display Modes

    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 21:21.


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