Raised This Month: $ Target: $400
 0% 

[ANY] Simple Mysql Whitelist


Post New Thread Reply   
 
Thread Tools Display Modes
Author
vijayar
Senior Member
Join Date: Sep 2020
Plugin ID:
5331
Plugin Version:
1.5
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Mysql database whitelister to control player access to server[s].
    Old 06-18-2021 , 02:31   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #1

    Changed database name. Recomplied the scriptfile provided with latest sourcemod. Getting this error

    L 06/18/2021 - 12:004: [SM] Exception reported: Invalid database Handle 0 (error: 4)
    L 06/18/2021 - 12:004: [SM] Blaming: simple_mysql_whitelister.smx
    L 06/18/2021 - 12:004: [SM] Call stack trace:
    L 06/18/2021 - 12:004: [SM] [0] Database.Query
    L 06/18/2021 - 12:004: [SM] [1] Line 417, simple_mysql_whitelister.sp::Server_Command_A dd

    Last edited by vijayar; 06-18-2021 at 09:30.
    vijayar is offline
    vijayar
    Senior Member
    Join Date: Sep 2020
    Old 07-06-2021 , 01:55   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #2

    Quote:
    Originally Posted by vijayar View Post
    Changed database name. Recomplied the scriptfile provided with latest sourcemod. Getting this error

    L 06/18/2021 - 12:004: [SM] Exception reported: Invalid database Handle 0 (error: 4)
    L 06/18/2021 - 12:004: [SM] Blaming: simple_mysql_whitelister.smx
    L 06/18/2021 - 12:004: [SM] Call stack trace:
    L 06/18/2021 - 12:004: [SM] [0] Database.Query
    L 06/18/2021 - 12:004: [SM] [1] Line 417, simple_mysql_whitelister.sp::Server_Command_A dd
    Figured out that the above message comes when you try to add/delete a Steam ID just after the server has started and the first user has not joined. Join the server either as admin or as normal user once and post that the server commands works.

    Further the issue pertaining to STEAM_0: and ingame STEAM_1: has been resolved thanks to Bacardi who shared the method wherein the first 8 characters in the Steam are ignored. Now you can store the Steam ID in its regular form i.e STEAM_0:0:123456.

    Find attached the modified script.
    Attached Files
    File Type: sp Get Plugin or Get Source (simple_mysql_whitelister_modified.sp - 110 views - 22.0 KB)

    Last edited by vijayar; 07-06-2021 at 01:56.
    vijayar is offline
    Ryan2
    Senior Member
    Join Date: Jul 2020
    Old 08-19-2021 , 00:02   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #3

    No need to worry about MySQL injection etc because it just gets players STEAMID, correct? Just thought I'd ask.
    Ryan2 is offline
    vijayar
    Senior Member
    Join Date: Sep 2020
    Old 08-23-2021 , 03:26   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #4

    Quote:
    Originally Posted by Ryan2 View Post
    No need to worry about MySQL injection etc because it just gets players STEAMID, correct? Just thought I'd ask.
    Didn't understand your query. This plugin allows you to add & manage Steam ID you want to whitelist on the server, manually through console or admin account in server. You can also insert the Steam ID directly into the mysql database.
    vijayar is offline
    Teamkiller324
    Senior Member
    Join Date: Feb 2014
    Location: Earth
    Old 08-24-2021 , 10:11   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #5

    Using OnClientConnect would be instant kick as it's fired before player_connect but could be too early to call the steamid, you could possibly use event player_connect or OnClientConnected otherwise since you can get the steamid there, these are called before OnClientAuthorized.

    Here's a slight change in code.
    Attached Files
    File Type: sp Get Plugin or Get Source (simple_mysql_whitelister.sp - 116 views - 21.8 KB)
    __________________

    Last edited by Teamkiller324; 08-24-2021 at 10:25.
    Teamkiller324 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 13:28.


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