Hooking Forums With Auto Whitelist

Discussion in 'Bukkit Help' started by lopsideful, Nov 16, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    Hello everyone!
    So I'm wondering if there's a way to 'hook' my Simple Machines Forum, with my Minecraft Server Whitelist. So when a user registers on my forum website and fills out their Minecraft Username, it automatically adds them to my Minecraft Whitelist.

    I recall there was a tutorial explaining this using the MySQL database on the Simple Machines Forum and somehow hooking it to the Server Whitelist, however, the tutorial has since gone offline due to inactivity of the writer.

    Can anyone help with this? Please let me know, thanks!

    Here's the previous tutorial that has gone offline https://forums.bukkit.org/threads/t...r-automated-whitelisting-mysql-db-info.14835/

  2. Offline


  3. Offline


    First of all, what are some specs of your servers? I'm going to assume you have a simple machine forum server, and a minecraft server setup already? Mainly, I want to know if they are both running on the same machine or separate? Secondly, What level of access do you have? Can you install new programs/make changes to files etc.?
  4. Offline


    Thanks for the reply! The server is hosted through a separate hosting company and the forums are hosted through a website hosting company. So each are separate. I do have full access to all files on both the forums and server, and have adequate knowledge of backend MySQL/FTP editing.
  5. Offline


    OK, so I've been going at this from 2 angles -
    1). The whitelist plugin: The most up to date and simplest one I could find is AutoWhitelist <-- Link. see if you can get this part up and running, however, be aware that the plugin needs a database with existing table, it will not create its own. A table with a single column called "player_name" or something is all it needs. Set the config file up with the connection info and etc, don't for get to change the MySQL statements to reflect the table and column names you picked.
    2). How to get info from SMF into our white-list database: I found a section in the log in procedure where it checks if the user is logging in for the first time ever. I am going to try to write a simple script to get the info from there and insert it into our white-list database. I will let you know how I go with this.
    Let me know if & when you get the plugin set up. I would like to make one point that might give you trouble at some stage: If you have your forum and its database on a shared web-hosting server, The amount of load on the web server can sometimes make the database inaccessible, and in that case your players will not be able to log in to your minecraft server. But if you can't avoid using that setup, it will probably work OK for a small server that doesn't have too many log in events. In any case let me know how you go.

    Can you please post this file: '<your SMF folder here>/Sources/LogInOut.php' lines 500-520 so I can check if they are the right ones?
  6. Offline


    Alrighty! I managed to create the 'whitelist' mysql database (seperate from the forum's database), aswell as a playername table/column within that database. Entitled player_name However I'm a bit stumped on hooking that information into the Whitelist plugin config you sent.

    Secondly, not sure if the second part of your post is directed towards me? You seem to go into a problem with /pex promote? Which doesn't apply to my situation xD
    However you mentioned to paste my '<your SMF folder here>/Sources/LogInOut.php' lines 500-520 which I have done:

    Weird! Must have been a forum glitch xD

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 5, 2016
  7. Offline


    Anyway, Did you get your plugin to talk to your database? If not here's a copy of mine so you can get an idea http://pastebin.com/bKs3GeLB Edit- try setting debug mode to true and see what errors you get? Edit 2- I have a working script that goes after line 16 in that paste bin link line 16 "$_SESSION['first_login'] = true;" But we will get to that when you get your plugin set up.
  8. Offline


    Messaged you through inbox :)
Thread Status:
Not open for further replies.

Share This Page