Raised This Month: $ Target: $400
 0% 

[ANY] Simple Mysql Whitelist


Post New Thread Reply   
 
Thread Tools Display Modes
Author
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
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 04-15-2017 , 20:51   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #1

    Look changelog for information.
    Quote:
    Updated to 1.5!
    __________________
    xines is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 06-15-2017 , 01:11   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #2

    On latest version 1.5, when I attempt to use sm_server_whitelist_add. SM 1.9, database configured properly.

    Code:
    L 06/15/2017 - 00:04:41: [SM] Exception reported: Invalid database Handle 0 (error: 4)
    L 06/15/2017 - 00:04:41: [SM] Blaming: simple_mysql_whitelister.smx
    L 06/15/2017 - 00:04:41: [SM] Call stack trace:
    L 06/15/2017 - 00:04:41: [SM]   [0] Database.Query
    L 06/15/2017 - 00:04:41: [SM]   [1] Line 417, G:\sourcemod 1.8\scripting\simple_mysql_whitelister.sp::Server_Command_Add
    __________________

    Last edited by sneaK; 06-15-2017 at 01:11.
    sneaK is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 06-15-2017 , 09:58   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #3

    Quote:
    Originally Posted by sneaK View Post
    database configured properly.
    Sure about that?

    __________________
    xines is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 06-15-2017 , 11:07   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #4

    Quote:
    Originally Posted by xines View Post
    Sure about that?

    Double checked, triple checked, quadruple checked. Exact same information as all of my other database entries, with the exception of the database name.

    Code:
    	"whitelister"
    	{
    		"driver"			"mysql"
    		"host"				"xx.xx.xx.xx"
    		"database"			"whitelist_surftop50"
    		"user"				"xx"
    		"pass"				"xx"
    		"port"				"3306"
    	}
    __________________

    Last edited by sneaK; 06-15-2017 at 11:08.
    sneaK is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 06-15-2017 , 11:17   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #5

    Quote:
    Originally Posted by sneaK View Post
    Double checked, triple checked, quadruple checked. Exact same information as all of my other database entries, with the exception of the database name.

    Code:
    	"whitelister"
    	{
    		"driver"			"mysql"
    		"host"				"xx.xx.xx.xx"
    		"database"			"whitelist_surftop50"
    		"user"				"xx"
    		"pass"				"xx"
    		"port"				"3306"
    	}
    Whats your defined database name in the .sp itself?

    Also try markout the port, so it looks like the following.

    Code:
    	"whitelister"
    	{
    		"driver"			"mysql"
    		"host"				"xx.xx.xx.xx"
    		"database"			"whitelist_surftop50"
    		"user"				"xx"
    		"pass"				"xx"
    		//"port"			"0"
    	}
    __________________
    xines is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 06-15-2017 , 11:24   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #6

    I haven't modified the .sp at all, so it should be default "whitelister".

    I originally had the database defined without port, thought that was the problem (since all of my other databases are specified with port), added it, and didn't fix the problem.
    __________________
    sneaK is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 06-15-2017 , 11:51   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #7

    Quote:
    Originally Posted by sneaK View Post
    I haven't modified the .sp at all, so it should be default "whitelister".
    Code:
    /*-> Database table name to use for connection <-*/
    #define DB_Name "mysql_whitelist"
    /*###############################################*/
    As you can see above, you missed the preset database table name mysql_whitelist, change the line to whitelist_surftop50, then recompile the plugin, put it in plugins, and restart server.
    __________________
    xines is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 06-15-2017 , 11:59   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #8

    Oh huh, thats odd. Kept it at the default db name, changed the name in the database config, created the new database, restarted server... and same error.

    Solution: Figured out it was because the server was freshly restarted, and the plugin had not made the database connection yet. Disable hibernation and it works just fine!
    __________________

    Last edited by sneaK; 06-18-2017 at 00:35.
    sneaK is offline
    zwetch
    Senior Member
    Join Date: Aug 2015
    Location: South Africa
    Old 03-05-2021 , 03:48   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #9

    Database doesn't work, the flag does though.

    Edit: Works if steamid changed from STEAM_0:0:00000 to STEAM_1:0:00000
    __________________
    https://forums.alliedmods.net/signaturepics/sigpic262740_1.gif

    Last edited by zwetch; 03-05-2021 at 03:53.
    zwetch is offline
    hoyxen
    Member
    Join Date: Mar 2021
    Old 03-05-2021 , 04:33   Re: [ANY] Simple Mysql Whitelist
    Reply With Quote #10

    nice plugin!
    __________________
    hoyxen 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