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

[ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ojmdk476oj
AlliedModders Donor
Join Date: Dec 2009
Plugin ID:
2452
Plugin Version:
1.0.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Only steamids in the database may join.
    Old 07-23-2011 , 19:19   [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #1

    What it does
    If someone is not in your MySql database they will get kicked, also. You can setup immunity up for a group, or someone with a special flag.



    Features
    You can add or delete SteamIDs from in-game if you have the root flag, you can edit the source if you want it to be another flag.
    It's also possible to get a list of all the SteamIDs in the database with one command.



    Commands
    • sm_steamid_restrict_add <steamid> - Adds a SteamID to the database.
    • sm_steamid_restrict_delete <steamid> - Deletes a SteamID from the database.
    • sm_steamid_restrict_list - Outputs all the SteamIDs in the database to console.



    CVars
    • sm_steamid_restrict_version - SteamID Restrict Version (unchangeable).
    • sm_steamid_restrict_type - Should groups or admins with a flag be immune to being kicked (1 = Group, 2 = flag, 0 = disabled).
    • sm_steamid_restrict_group - What is the group name of the admins that should be immune (sm_steamid_restrict_type needs to be 1 for this).
    • sm_steamid_restrict_flag - What flag should a admin need to be immune of being kicked, look in admin_levels.cfg for flags (sm_steamid_restrict_type needs to be 2 for this).
    • sm_steamid_restrict_bots - Should bots be allowed to join the server (0 = no, 1 = yes).
    Config file will automatic be generated in "cfg/sourcemod/sm_steamid_restrict.cfg".



    Installation
    First you need to make a database for this plugin. Now download "steamid_restrict.sql.txt" and rename it to "steamid_restrict.sql".
    Now import "steamid_restrict.sql" to the database you just created.
    After that open you databases.cfg located at "addons/sourcemod/configs/databases.cfg" and add the following.
    PHP Code:
        "restrict"
        
    {
            
    "driver"              "default"
            "host"                "address_to_mysql"
            "database"            "database_name_in_mysql"
            "user"                "username_to_mysql"
            "pass"                "password_to_mysql"
            
    //"timeout"           "0"
            //"port"              "0"
        

    Ex.
    PHP Code:
        "restrict"
        
    {
            
    "driver"              "default"
            "host"                "localhost"
            "database"            "restrict"
            "user"                "root"
            "pass"                ""
            
    //"timeout"           "0"
            //"port"              "0"
        

    Now just place the steamid_restrict.sp in "addons/sourcemod/scripting", and steamid_restrict.smx in "addons/sourcemod/plugins".
    So now you are ready, just restart your server configure the file at "cfg/sourcemod/sm_steamid_restrict.cfg" to what you like, and restart again.



    Changelog
    Quote:
    2011-07-23 (1.0.0)

    * Initial release

    Credits
    sEbbo for making the first MySql plugin for this this thread.
    BAILOPAN for creating the original plugin, but it stored the persons in a file.
    And the folks in this thread for showing me the basic and give me a start code.
    ejik03 for showing me how to see if a person is in a group here.
    dataviruset for looking at his code and see how he checked for the admins flag, and compare it in SM_Hosties

    That was a pretty long credits list, but that's how it's.
    I mostly just look at other code and put something together from that.

    Please report any bugs you find or if you have a suggestion(s) just write a PM to me or write here.
    Attached Files
    File Type: txt steamid_restrict.sql.txt (187 Bytes, 820 views)
    File Type: sp Get Plugin or Get Source (steamid_restrict.sp - 1735 views - 9.7 KB)

    Last edited by ojmdk476oj; 10-22-2013 at 08:34. Reason: Edit of title
    ojmdk476oj is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 10-21-2013 , 10:16   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #2

    So this is basically whitelist, right?
    I presume, it is not possible to add steam groups...
    __________________
    luki1412 is offline
    ojmdk476oj
    AlliedModders Donor
    Join Date: Dec 2009
    Old 10-21-2013 , 11:10   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #3

    Quote:
    Originally Posted by luki1412 View Post
    So this is basically whitelist, right?
    I presume, it is not possible to add steam groups...
    Yes. This was originally intended for a PCW server I had.

    And no, it's not possible to use steam groups. But, it should be possible to add support for it. But since I don't have servers anymore, it isn't something I'm interested in doing.
    ojmdk476oj is offline
    XxDragoNxX
    Junior Member
    Join Date: Mar 2010
    Old 10-22-2013 , 07:11   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #4

    Do you want servers again?

    Sounds to me like this is something that is seriously lacking, especially to those whom want to run donation access only servers or even private matches, it will remove the risk of needing to give out a password and those you give it too just throwing it to anyone and ruining matches/practice.
    XxDragoNxX is offline
    ojmdk476oj
    AlliedModders Donor
    Join Date: Dec 2009
    Old 10-22-2013 , 08:33   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #5

    Quote:
    Originally Posted by XxDragoNxX View Post
    Do you want servers again?

    Sounds to me like this is something that is seriously lacking, especially to those whom want to run donation access only servers or even private matches, it will remove the risk of needing to give out a password and those you give it too just throwing it to anyone and ruining matches/practice.
    I can see the reason for PCW where you have a group of people. But for donations, I can't. Because normally you would have a script run when a player donate, and then it'll add him to a database so he gets admin. You could easily add them to the database also you could use "sm_steamid_restrict_flag" for donations.


    I suggest using this one instead: https://forums.alliedmods.net/showthread.php?t=199794 is has all the features that this have, and more.

    Last edited by ojmdk476oj; 10-22-2013 at 08:36.
    ojmdk476oj is offline
    isayldz
    Member
    Join Date: Nov 2012
    Old 03-29-2014 , 17:07   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #6

    L 03/29/2014 - 16:43:15: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
    L 03/29/2014 - 16:43:15: [SM] Displaying call stack trace for plugin "steamid_restrict.smx":
    L 03/29/2014 - 16:43:15: [SM] [0] Line 113, steamid_restrict.sp::CheckSteamID()
    L 03/29/2014 - 16:43:15: [SM] [1] Line 105, steamid_restrict.sp::OnClientPostAdminCheck()
    isayldz is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 03-29-2014 , 22:55   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #7

    @Isayldz

    It's not a plugin error , check your databases.cfg to see if it's correct and reload plugin.
    __________________
    ecca is offline
    isayldz
    Member
    Join Date: Nov 2012
    Old 03-31-2014 , 21:18   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #8

    i installed this plugin. Dabase config succesfield
    sm plugin load succesfield.

    But still any player may join game server :S i think have to update..
    isayldz is offline
    Wolfseye
    Senior Member
    Join Date: Apr 2014
    Location: Germany
    Old 06-22-2014 , 07:43   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #9

    Ok, I tried to install this. But some things are off. I can add Steam ID's to the DB, but if I for example put in a SteamID like STEAM_0:1:1234589 it becomes STEAM_1:1:1234589.

    So when I first tried with a friend, he still couldn't join after I added his ID with the kinda changed from STEAM_0 to STEAM_1 which the plugin did himself. So then I went into the MySQL Database with PHPMyAdmin and added his ID manually.

    He could join then, but from this point on I could not delete this SteamID again, which makes no sense. The plugin doesn't know If i added an ID manually or not. So that whole thing is very buggy as it seems.

    Now I emptied the SteamID's manually from the DB. My friend tried to connect again, and in this case it was supposed to not work. And it didnt. In the meantime I was on the Server, adding his SteamID again (which also showed up in the list), but still, he could not connect. DB connection was fully working. Is there a refresh command for this after adding or deleting someone ?

    Last edited by Wolfseye; 06-22-2014 at 07:52.
    Wolfseye is offline
    Send a message via Skype™ to Wolfseye
    rautamiekka
    Veteran Member
    Join Date: Jan 2009
    Location: Finland
    Old 08-07-2014 , 09:37   Re: [ANY] Mysql SteamID Restrict (v1.0.0, updated 2011-07-24)
    Reply With Quote #10

    I haven't tested this plugin, so I can't be totally sure, but looking at the source code this won't work on CS:GO cuz the SteamID is different. But there's a catch: the first number in the ID is always 1 in CS:GO, and possibly some other games. For example, if your SID is STEAM_0:0:123456 outside CS:GO, like in CS:S or HL2DM, it's STEAM_1:0:123456 in CS:GO. Therefore, like some plugin makers have realized, looking at the ID from position 9 onwards, kills the engine/game dependency; STEAM_1:0:123456 -> 0:123456. It's said that's how SM internally stores Admin IDs.

    Next, the SQL codes look like they should work on SQLite too, though. Making them work is nothing rocket science.

    And why the fuck is this still a New Plugin ???
    __________________
    Links to posts I received Karma from:
    Big thanks to all who gave Karma
    rautamiekka is offline
    Send a message via ICQ to rautamiekka Send a message via AIM to rautamiekka Send a message via MSN to rautamiekka Send a message via Yahoo to rautamiekka Send a message via Skype™ to rautamiekka
    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:46.


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