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

SQL Admin Plugins MultiServ edition


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Plugin ID:
688
Plugin Version:
1.0.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    SQL Admin plugins that select groups to add by server IP.
    Old 12-20-2008 , 09:48   SQL Admin Plugins MultiServ edition
    Reply With Quote #1

    Hi,

    I've extended the SQL admin scripts (both prefetch and threaded) to load admin groups by Server IP.

    Before going into greater detail, I'm well aware that SourceBans does provide exactly this functionality, but I think it's somewhat overkill to install SourceBans _only_ for this, so I've modified their code to work with the standard admin plugins.

    To use this, you need to have the following tables (aside the standard SourceMod tables) in your databases:
    1. sm_servers:
      • id INT PRIMARY KEY
      • ip VARCHAR(15)
      • port INT
    2. sm_servers_groups
      • server_id INT
      • group_id INT
    To add an admin to one certain server, you need to do the following:
    1. Create an admin group entry in sm_groups.
    2. Create a server entry in sm_servers, that lists the server in question.
    3. Link the group to the server(s) by entering the corresponding IDs to sm_servers_groups.
    4. Add the admin to the group by entering their IDs into sm_admins_groups.
    5. Give the group(!) all the permissions you want the user to have on this server.
    In general, you need to change your Admin management to be group based to take full advantage of this. Admins will inherit their rights from the groups they are in, and what groups exist now depends on the server you're playing on.

    If you want an Admin to have the same rights on every server, you don't need to put them into any groups, you just give them the rights they should have in sm_admins and that's it.

    Regards
    MistaGee
    Attached Files
    File Type: sp Get Plugin or Get Source (admin-sql-prefetch.sp - 2520 views - 10.5 KB)
    File Type: sp Get Plugin or Get Source (admin-sql-threaded.sp - 2225 views - 21.5 KB)
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble

    Last edited by MistaGee; 03-20-2009 at 11:24.
    MistaGee is offline
    Send a message via ICQ to MistaGee
    HSFighter
    Veteran Member
    Join Date: Aug 2007
    Location: Flensburg - Germany
    Old 12-20-2008 , 10:47   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #2

    Excellent job MistaGee

    I add this settings optional to the next relase of Sourcemod-Webadmin.
    My planning for the multi-server support for SQL-Admins is no longer necessary yet.

    Quote:
    If you want an Admin to have the same rights on every server, you don't need to put them into any groups, you just give them the rights they should have in sm_admins and that's it.
    When i doun't add an group to "sm_servers_groups", has the group rights on every server?

    Suggestion to the SM Development:

    It will be nice to include this plugins in the SourceMod 1.2 Branch.

    Regards
    HSFighter
    __________________



    Sorry for my very bad english
    Greetings HSFighter

    Last edited by HSFighter; 12-20-2008 at 12:00.
    HSFighter is offline
    Send a message via ICQ to HSFighter
    MistaGee
    Senior Member
    Join Date: Aug 2004
    Location: Germany (Fulda)
    Old 12-20-2008 , 12:24   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #3

    Quote:
    Originally Posted by HSFighter View Post
    Excellent job MistaGee
    Thanks

    Quote:
    Originally Posted by HSFighter View Post
    When i doun't add an group to "sm_servers_groups", has the group rights on every server?
    No, Groups only exist on the servers they're linked to in sm_servers_groups. If they're not linked to any server, they won't exist on any.
    Quote:
    Originally Posted by HSFighter View Post
    Suggestion to the SM Development:
    It will be nice to include this plugins in the SourceMod 1.2 Branch.
    Good point - A plugin of mine is already included in AMXmodX, but I still need one for SourceMod

    Regards
    MistaGee
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble
    MistaGee is offline
    Send a message via ICQ to MistaGee
    HSFighter
    Veteran Member
    Join Date: Aug 2007
    Location: Flensburg - Germany
    Old 06-16-2009 , 12:59   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #4

    The Sourcemod Webadmin supporting now this Plugin:




    Quote:
    Originally Posted by HSFighter View Post
    The necessary SQL-Tables will be create if you install or update to Sourcemod-Webadmin v2.0 or higher!
    You need to replace the "admin-sql-prefetch.smx" or "admin-sql-threaded.smx" plugin.

    If you doun't use SQL-Admins before, you need to install the "sql-admin-manager.smx" plugin to.
    This plugin is include with sourcemod packet.

    To activate the plugin-options in the webinterface
    enable the "Servergroups" in the "Interface" --> "Settings" menue.
    __________________



    Sorry for my very bad english
    Greetings HSFighter

    Last edited by HSFighter; 07-07-2009 at 17:59.
    HSFighter is offline
    Send a message via ICQ to HSFighter
    Undead46
    Junior Member
    Join Date: Mar 2008
    Old 07-07-2009 , 15:15   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #5

    I do have a question, do I need to modify/add any tables? Or will the plugin do it for me?
    Undead46 is offline
    MistaGee
    Senior Member
    Join Date: Aug 2004
    Location: Germany (Fulda)
    Old 07-07-2009 , 17:40   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #6

    the plugin doesn't do the initialization itself, so you will have to do this manually.
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble
    MistaGee is offline
    Send a message via ICQ to MistaGee
    Undead46
    Junior Member
    Join Date: Mar 2008
    Old 07-08-2009 , 01:57   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #7

    What's the SQL I need to query then?
    Undead46 is offline
    MistaGee
    Senior Member
    Join Date: Aug 2004
    Location: Germany (Fulda)
    Old 07-08-2009 , 17:27   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #8

    For MySQL, that would be:

    Code:
    CREATE TABLE `sm_servers` (
      `id` int(11) NOT NULL auto_increment,
      `ip` varchar(15) NOT NULL,
      `port` int(11) NOT NULL,
      `name` varchar(200) default NULL,
      PRIMARY KEY  (`id`)
    );
    
    CREATE TABLE `sm_servers_groups` (
      `server_id` int(11) NOT NULL,
      `group_id` int(11) NOT NULL,
      PRIMARY KEY  (`server_id`,`group_id`)
    );
    Hope that helps.
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble
    MistaGee is offline
    Send a message via ICQ to MistaGee
    el_matador
    Junior Member
    Join Date: Jan 2010
    Old 02-26-2011 , 07:07   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #9

    where is the difference between threaded and prefetched plugin?
    el_matador is offline
    Jumpman
    Senior Member
    Join Date: Mar 2010
    Location: Denmark
    Old 01-18-2012 , 03:46   Re: SQL Admin Plugins MultiServ edition
    Reply With Quote #10

    That im not understand MistaGee

    In your first post you write this

    sm_servers:
    • id INT PRIMARY KEY
    • ip VARCHAR(15)
    • port INT
    In your last post you write mysql sting should be

    CREATE TABLE `sm_servers` (
    `id` int(11) NOT NULL auto_increment,
    `ip` varchar(15) NOT NULL,
    `port` int(11) NOT NULL,
    `name` varchar(200) default NULL,
    PRIMARY KEY (`id`)
    );

    What to use the last post have one more table "name" should i use your first post or the last post ?
    Jumpman 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 01:31.


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