[INACTIVE] [ADMN] Albus v4.0 Final - Use forum grouping to control whitelist via MySQL [953]

Discussion in 'Inactive/Unsupported Plugins' started by Ant59, Feb 1, 2011.

     
  1. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Want to rank players with GroupManager/Permissions using your forum system instead? Use Warrant!

    [IMG]

    [DistrictMine] Albus v4.0
    Whitelisting via forum grouping

    Albus is a whitelist plugin that allows admins to whitelist their servers, by grouping members in their forum. The Bukkit server will ask the forum's database - whenever someone logs in - whether their username in the forum has a group id that is allowed to join the server.

    This is especially good for subscription servers, where SMF subscriptions are used. It will completely automate the whitelist function for your minecraft server.

    Download JAR: http://dl.dropbox.com/u/29840218/Albus.jar
    Download MySQL Connector: http://dl.dropbox.com/u/29840218/mysql.jar
    View Source: https://github.com/Ant59/Albus

    Installation
    1. Place Albus.jar in your plugins directory
    2. Place mysql.jar (the mysql java connector) into the root of your bukkit server, in the same folder as craftbukkit.jar
    Configuration


    All configuration settings can be found in the auto-generated properties file, found in plugins/Albus/Albus.properties

    Properties and explanations

    kick-message - Message to display to players not on whitelist when they try to login
    kick-message-registered - Message to display to players not in a whitelisted but registered on the forum. Making this blank will turn off this functionality, saving memory by not memorising all registered forum members.
    mysql-host - The MySQL server IP or URL
    mysql-port - Port of MySQL server (3306 by default)
    mysql-db - Database to find member data
    mysql-table - The table used for member data
    mysql-user - Name of MySQL User
    mysql-pass - Password for MySQL user
    username-field - The field that your forum engine stores the user's minecraft player name
    group-field - The field that your forum engine stores the group ids of users
    allowed-group-ids - The group ids to which a user must belong to be allowed in
    reload-period - Not yet used. In a future version, you may change the period of time between auto database checks from 5 minutes to any length.

    I took my own time to make this plugin and distribute it and would really appreciate a small donation if you find it useful :) Thank you!

    [IMG]
    nogoodwithnames, WolwX and Niemand like this.
  2.  
  3. Offline

    dark navi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This is actually pretty awesome. You should make one for MyBB :p
  4. Offline

    Juze

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Same for phpBB forums, please!
  5. Offline

    dark navi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Actually, I think it would be easier if you just had a property that looked for a values in table/column, like a custom profile field and a user-group.
  6. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Yeah, I might expand on it. I ought to allow custom table/column settings.
  7. Offline

    Darchiv

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I've just downloaded this plugin and done everything in order:
    1. Get 'mysql-connector-java-bin.jar'.
    2. Put plugin in 'plugin' directory.
    3. Start, stop server.
    4. Edit properties file to functioning DB data.
    5. Start server and:
    Code:
    [INFO] [SMHWhite] v1.0 - Running database connection...
    [WARNING] [SMHWhite] v1.0 - MySQL connection failed: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    [WARNING] [SMHWhite] v1.0 - The following statement failed: select member_name from members where id_group IN(1,2,3)
    [WARNING] [SMHWhite] v1.0 - Statement failed: java.lang.NullPointerException
    [WARNING] [SMHWhite] v1.0 - Failed to load whitelist
    6. I've checked that MySQL query and it worked for me.

    Can you help me? :(

    @EDIT
    I've downloaded many versions of Connector/J, but all of them give the error above.
    What name have this file to have?
  8. Offline

    Minecraftism.net

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I hope that you get a chance to implement with other forum software. If you need a IPS to test on, I have you covered with a site that is in development so it doesn't matter if things go a little stray.
  9. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Sorry for the inactivity guys. I'm at work currently, but as soon as I get in, I'll be updating this, adding more custom support, more forum support, and I'll be making it easier to implement the MySQL functionality. Seems it's been broken by Bukkit being updated recently.
  10. Offline

    Darchiv

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Huh, I'm waiting for PunBB implementation of that plugin (database structure - http://punbb.informer.com/docs/dev.html).
    If you can do this (and have time for it) I'll be very happy. I can't start my server without that [IMG]
  11. Offline

    Eroing

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Will this work with SQLite?
  12. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Why would that be advantageous Eroing? The plugin is designed to allow whitelisting according to forum grouping.
    Please explain why it would need SQLite functionality, and I'd be happy to add it :)

    UPDATE!
    I have updated the plugin to allow for custom setups, and expansion beyond SMF only. I have also changed the name to Albus, in case you're wondering where SMFWhite has gone.

    Enjoy!
  13. Offline

    Tasoli

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    2 questions:

    1) does the expanded version of config support, say, phpbb3?

    2) is this for servers where the server is the webhost only, or could i run this on my home server and then call into a database on my webhost that I pay for hosting from?

    3) sqlite? (lol :p)
  14. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Yes, it supports phpBB3, and I will write an example config for it.

    It is designed to talk to MySQL databases on other servers aswell as locally, since this is how I run my server. I have minecraft running alone, and Albus can communicate with my webspace database fine.

    Lol, I still don't understand why on Earth that would be beneficial, since forums generally all run on MySQL.
  15. Offline

    Darchiv

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Ant59, see this:
    Code:
    rs = sql.trySelect("SELECT " + propConfig.getProperty(PROP_USERNAME_FIELD) + " from " + propConfig.getProperty(PROP_MYSQL_USERS_TABLE) + " WHERE " + propConfig.getProperty(PROP_USERNAME_FIELD) + " IN(" + propConfig.getProperty(PROP_ALLOWED_GROUP_IDS) + ")");
    This propConfig.getProperty(PROP_USERNAME_FIELD) after WHERE don't have to be PROP_GROUP_FIELD?
    Maybe I'm wrong, but I can't check it cause I don't know how compile-or-something-like-that this code.
  16. Offline

    Kane

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Kind of sucks I got Xenfor forums :p Will never get this feature I guess lol
  17. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I had fixed this in my most recent export Darchiv, but had not committed it to the git repo. It is fixed now :)

    Lol Kane, sorry about that. Does XenForo not work by the same sort of system?

    UPDATED!
    I have fixed EVERYTHING and cleared up all the unnecessary code I left behind. This current release works perfect and I am currently using it on districtmine.net

    I have edited the OP to add all the details of properties. If anyone would like to write examples for any other db engines, then I would really welcome that! Also, if you need any help setting it up, you can catch me in the bukkit IRC channel :)

    Hope this proves useful!
  18. Offline

    Seze

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I tried using this plugin, but its not working. In game, I can run /Albus list and it shows everyone that should be on the whitelist, but the server won't kick anyone who is not on that list, it is letting everyone in. I tried this with craftbukkit builds 323 and 326. Looking at some of the code in AlbusListener.java, it looks like it should log whether the user was allowed to connect or not. I see no such listings on console or in any of the logs. Its like the listener isn't working at all.

    Code:
    2011-02-14 23:32:20 [INFO] [Albus] v2.0 - Trying to load whitelist and settings...
    2011-02-14 23:32:20 [INFO] [Albus] v2.0 - Enabled!
    2011-02-14 23:32:20 [INFO] Done! For help, type "help" or "?"
    2011-02-14 23:32:20 [INFO] [Albus] v2.0 - Running database connection...
    2011-02-14 23:32:21 [INFO] [Albus] v2.0 - Whitelist Loaded
    2011-02-14 23:32:39 [INFO] username [/123.123.123.123:12345] logged in with entity id 102
    
    Any thoughts?
  19. Offline

    Phantom Index

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Be nice if this worked for xenforo.
  20. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Sorry about that Seze, fixed that now. I mixed up a variable. Re-download and it checks on login fine as far as I can tell from testing.
  21. Offline

    Darchiv

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Thank you very much Ant59!
    It's the best plugin for external authorization that I know.
    PS Check your PayPal account [IMG]
  22. Offline

    dfdgsdfg

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I have error sth like below

    Of course I have field that is named name, group that is contained value 1 or 2 .

    What should I do?

    bukkitcraft 326 with mysql 5.5.8

    1. Get 'mysql.jar' from your download link.
    2. Put plugin in 'plugin' directory.
    3. Start, stop server.
    4. Edit properties file to functioning DB data.
    5. Start server and:

  23. Offline

    wilsonc91

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Would love to see support for other forum software - thanks and great work.
  24. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Thank you Darchiv! I'm very glad this has proven useful to you. :)
    --- merged: Feb 15, 2011 8:31 PM ---
    dfdgsdfg, it would appear you have entered the wrong details for your table. This has caused an error in the sql syntax, since it appears it cannot find the field "group".
  25. Offline

    dark navi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Don't know if I am looking at this wrong, but my users minecraft names and user groups are stored in 2 different tables. Is there a way to check that?
  26. Offline

    dfdgsdfg

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I have the "group" field.

    What should i do?

    Also can I use "y" or "n" value in "allowed-group-ids"?
  27. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Dfdgsdfg, can you send me a copy of an example user's row in your database too please, since I can then work out what fields you'd need :)
  28. Offline

    dark navi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Please add an option for multiple tables :(
  29. Offline

    dfdgsdfg

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Here is my forum table.


    and..

    :)
  30. Offline

    Ant59

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Dark Navi, I'm not sure about that. Can you send me a more complete example of your database structure please?

    dfdgsdfg, your situation seems to be the same as Dark Navi.

    It's midnight here right now, so I can't think straight, but I will get back to you both with a solution in the morning :) I know how to achieve it with table joining, but I'm not in a state to write it out tonight. Give me 10 hours, I'll get it done for you both :)
  31. Offline

    dark navi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Essentially, everything is in the same DB, but they info is stored in two different tables. The way MyBB is set up, profile fields are stored in something like mybb_profileFields and user profiles (including info and which group a user is in) is stored in a table called mybb_userProfiles. Is there some where where you can pull the user ID's groups and use that to check the fields in other tables?

Share This Page