[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

    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
    [SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5][SIZE=5]Configuration[/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE]


    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. Offline

    T_Mac

    Code:
    2011-02-26 20:04:46 [SEVERE] Could not load plugins/Albus.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:80)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: net.districtmine.ant59.albus.Albus.<init>()
            at java.lang.Class.getConstructor0(Class.java:2706)
            at java.lang.Class.getConstructor(Class.java:1657)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:75)
            ... 8 more
    
    craftbukkit version 456
     
  3. Offline

    seriosbrad

    Can we get a few persmissions setup to work with GroupManager? I'm hoping to let my OPs and Admins be able to reload the whitelist when they ban a players account on the forum.
     
  4. Offline

    grapeman

    Thank you! working fine for me on #440. I you are looking to add features in the future, may I suggest: if a user if in group X, they receive a message saying they have been banned from the server for what ever reason.
     
  5. Offline

    Chojin

    Hello,

    here are modifications for recent Craftbukkit (493)
    I also added source diff file.

    Enjoy :)
     

    Attached Files:

  6. Offline

    grapeman

    getting the following with 493:

    Code:
    02:09:51 [SEVERE] Could not load plugins\Albus.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:80)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
            at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:205)
            at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleComma
    ndMap.java:196)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:381)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:366)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: net.districtmine.ant59.albus.Albus.<
    init>()
            at java.lang.Class.getConstructor0(Unknown Source)
            at java.lang.Class.getConstructor(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:75)
            ... 11 more
    --- merged: Mar 6, 2011 2:15 AM ---
    hey, I get the following with this version using 493:

    Code:
    02:15:10 [SEVERE] Could not load plugins\Albus.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:80)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.UnsupportedClassVersionError: net/districtmine/ant59/albus/
    Albus : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(Unknown Source)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$000(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:30)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:72)
            ... 8 more
     
  7. Offline

    Chojin

    Hmmm can you try again with this file ?
    I tested with Craftbukkit #499.

    Just unzip in plugins directory.
    I also attached .diff source file you can delete.

     

    Attached Files:

  8. Offline

    brafenschlug

    Would it be possible to specify a different kick-message if the plugin finds the user but the user's not belonging to the specified group and if the plugin doesn't find the user at all?

    E.g. "You are registered on the forum but not yet whitelisted" and "You have to register on the forum in order to play on this server"
     
  9. Offline

    Ant59

    UPDATE!
    I have updated the plugin to work correctly with the new version of CraftBukkit. I have also added in brafenschlug's suggestion to the functionality of the plugin. Hope this helps you all :)

    Check the OP under the config options to see the addition.

    Enjoy!
     
    grapeman likes this.
  10. Offline

    Chojin

  11. Offline

    Ant59

    No problem Chojin. Thanks for your temporary fix while I was busy :) Much appreciated.
     
  12. Offline

    Anoniempje

    Awesome, unfortnatly, my host does not allow external connections. Can you add a php file or such as means to connect to a server?
    Like instead of a text file with allowed players, you make it read a php file that has the list of allowed ppl. That would cut out the need for a mysql connection within the plugin and enables the use of any forum that can list its members in a webpage (Like any and all)
    You only need a php file if you have different forum software. The config file needs to be able to connect to a custom adress to make sure its not easy to find
    http://www.forumhost.com/SOmeWeiRdMapThat/LikeSSSto/differBetw33nUpper/anDLower/case.php or something
     
  13. Offline

    Ant59

    No, since Albus doesn't even use a text file in the first place. It reads directly from the forum's MySQL backend, to be as efficient as possible. If you want to make a list of people allowed on, use the Whitelist plugin instead.

    Also, no forum engine I know of will produce such an unformatted list of usernames that a plugin could read from on demand.
     
  14. Offline

    brafenschlug

    Whoa! That was incledibly fast! Thank you! Will test it out right away!
     
  15. Offline

    shadrxninga

    What forum software does this support?
     
  16. Offline

    grapeman

    Thank you for updating this - it's a very useful plugin!

    I do however seem to have a problem with it updating the whitelist. It used to check the table every couple of mins and tell me on the console. I set myself to a registered user that could not access the server and that gave me the correct message, but then changing myself back to an allowed user, I still recieve the same kick message.

    I've allowed the plugin to generate the new .properties file and i've made sure all details are correct. Could you suggest what I could do so it updates the whitelist?
     
  17. Offline

    Ant59

    The plugin automatically updates the whitelist every 5 minutes. However, you can force the update to occur at any time with the following command: /albus reload
     
  18. Offline

    grapeman

    ah ok thank you [​IMG]
     
  19. Offline

    Niemand

    Heyo!

    I get following error:
    Code:
    2011-03-07 15:48:53 [INFO] [Albus] v3.0 - Enabled!
    2011-03-07 15:48:53 [INFO] [Albus] v3.0 - Trying to load whitelist and settings...
    2011-03-07 15:48:53 [INFO] [Albus] v3.0 - Running database connection...
    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - MySQL connection failed: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - The following statement failed: SELECT username FROM mybb_users WHERE usergroup IN(4,6,8,9,10,) AND username != ""
    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - Statement failed: java.lang.NullPointerException
    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - Failed to load whitelist
    
    what does it mean with "MySQL connection failed: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" guess if I am able to fix that it will work fine.

    Sorry for the bother and thanks for reading.
     
  20. Offline

    hawianguy1189

    does this work with phpbb3?
     
  21. Offline

    patr1ck

    I would love a feature where special group ids would get automatically moved to a different groupmanager/permissions group
     
  22. Offline

    ShaDooM

    where did the changelog go ? :(
     
  23. Offline

    Teffen

    I love the idea of using a whitelist with MySQL but I don't have a forum. Could this be configured to just look for a table with just a column of names?
     
  24. Offline

    SweetCraft Girl

    Would be very nice if this supported XenForo, a premier Forum package by the same lead developer/creator of vBulletin, so it is not an obscure ware and come this time next year will be dominant on most forums.

    Also, Bukkit.org is XenForo....
     
  25. Offline

    goldseed

    Thanks. This is fantastic!!!>
     
  26. Offline

    brafenschlug

    I don't know if this is only me but, the kick-message-registered option doesn't work. It defaults to the standard message when an user is registered but not whitelisted.

    Running CB 516

    Code:
    #Automatically generated config file
    #Tue Mar 15 01:46:46 CET 2011
    group-field=
    kick-message=You must register on the website in order to join.
    kick-message-registered=You are registered on the website but not whitelisted yet.
    mysql-port=3306
    mysql-db=
    mysql-user=
    username-field=
    mysql-pass=
    mysql-table=
    allowed-group-ids=
    mysql-host=
    
    This is my albus.properties file, with the database details stripped. It works perfectly except for the registered message.
     
  27. Offline

    brafenschlug

    I've made a small plugin to get Albus cooperate with WordPress installations if anyone's interested. Hope you (Ant59) don't mind I used the same name as your plugin. If you don't like it I can delete it.

    http://wordpress.org/extend/plugins/albus/
     
    Ant59 likes this.
  28. Offline

    moose517

    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - The following statement failed: SELECT username FROM mybb_users WHERE usergroup IN(4,6,8,9,10,) AND username != ""
    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - Statement failed: java.lang.NullPointerException
    2011-03-07 15:48:53 [WARNING] [Albus] v3.0 - Failed to load whitelist

    i get those lines in my output as well, using phpBB3 and AFAIK the fields are matching up, unless i'm misunderstanding one of them


    Here is my output from the config file


    #Automatically generated config file
    #Wed Mar 16 23:35:35 PDT 2011
    group-field=group_id
    kick-message=You are not on the whitelist nor registered on the forum\!
    mysql-port=3306
    mysql-db=minecraft
    mysql-user=root
    username-field=username
    mysql-pass=XXXXXXXXX
    mysql-table=phpbb_users
    allowed-group-ids=3,4,5,7
    kick-message-registered=You are registered on the forum but not whitelisted\!
    mysql-host=localhost
     
  29. Offline

    Ant59

    Sounds excellent :D

    SQL statement error. You've got part of the details wrong.
     
  30. Offline

    mooztik

    great plug-in, but if server hosting and web hosting are differents , lots of web services (for security reasons) does not allow database access from external request .
    the solution is an API (on web server) who relay the plugin request (a simple http or https request) and API built the sql request and send the response to the server. (text, xml...) with possible encryption . this is the better and most compatible and secure solution.
    The only thing is defining the API request /response structure. then, any website can interface with server, and the plugin don't have needs of knowing each website sql structure. the developpment part (compatibility) need to be built on webserver side.

    and compatibility with permissions(phoenix) or/and with groupManager would be the most :)
     
  31. Offline

    moose517

    boy i did epic facepalm, i forgot that i'm not on the mySQL database server, i had localhost not the hostname of the mySQL server LOL. anyways, works great, now i just gotta get my email activation working right.
     

Share This Page