[ADMN/GEN] WhitelistPlus v0.2 - Whitelisting with permissions [818]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, May 9, 2011.

  1. Offline

    codename_B

    WhitelistPlus
    A whitelist plugin, plus more.

    Version: v0.2


    A fork of the Whitelist plugin to add permissions support.
    This plugin allows only people on your whitelist, or with the whitelist.permission.bypass node to join the server.

    Features:

    • Simple and easy to use
    • Broadcasts a message whenever someone tries to join that isn't whitelisted.
    • Uses permissions
    • Whitelist is automatically reloaded when changed outsite of minecraft (e.g. with a texteditor)
    • Whitelist supports console commands
    • SQL support
    • Support for every SQL database, that has a JDBC implementation available
    • User-defined table and database layouts supported
    Permission nodes:
    Code:
    whitelist.permission.bypass - bypass the whitelist check, don't have to be on the whitelist to join the server.
    whitelist.permission.use - base permission for users - necessary for these permissions to work.
    {
    whitelist.permission.add - permission to use the /whitelist add command.
    whitelist.permission.remove - permission to use the /whitelist remove command.
    whitelist.permission.onoff - permission to use the /whitelist on and /whitelist off commands.
    }
    
    Known bugs:
    • As of v0.2 you cannot use the commands in the server console.

    License:
    Distributed under the same license as the original Whitelist plugin. Full credit to the original author, I simply modified to suit my needs and distributed incase it suited anyone elses needs.
    Source and license included in the .jar file download.

    Download:
    Megaupload v0.2: Link

    Installation / configuration:
    Copy WhitelistPlus.jar in your plugins folder and start your server. The plugin will create new configuration files in plugins\whitelist.
    In plugins\whitelist.properties you can set the following options:

    • kick-message - The message that will be displayed, when a player is kicked from the server because he is not on the whitelist
    • disable-list-command - Disables the /whitelist list command.
    In your world.yml you can assign the following permission to bypass the whitelist check for a user.
    • whitelist.permission.bypass
    Commands:
    These commands can be used by those with permission in-game. You cannot currently use these with the server console.
    • /whitelist help - Shows the help ;-)
    • /whitelist reload - Reloads the whitelist and it's settings
    • /whitelist add [playername] - Adds a player to the whitelist)
    • /whitelist remove [playername] - Removes a player from the whitelist)
    • /whitelist on|off - Activates/deactivates the whitelist
    • /whitelist list - Lists all whitelisted players
    SQL configuration:
    To support as many different database configurations as possible, Whitelist sets flexibility over simplicity.
    This way virtually every existing database can be used as a base for authentification.

    For the following example I will assume you are using a MySQL Database with the following configuration:
    • Username: root
    • Passwort: fun
    • Database name: Bukkit
    • Table name: tbl_names with one column named "name"
    Because we are using MySQL, we need the MySQL Connector/J. It can be found here.

    Now that we have the connector up and running, it is time to configure Whitelist. This is done in plugins\whitelist.properties.
    1) Activate SQL mode
    sql-enable=true
    2) Set the correct JDBC driver. Because we are using MySQL in our example we choose:
    sql-driver=com.mysql.jdbc.Driver
    3) Set the connection string. It depends on the database system and layout used.
    In our example it is jdbc:mysql://localhost/Bukkit?user=root&password=fun.
    Because we have to escape some characters in *.propertie files, we add:
    sql-driver-connection=jdbc\:mysql\://localhost/Bukkit?user\=root&password\=fun
    4)We have to specify a query, that will be executed on the given database. If the query's result has at least one element, the user is allowed to access the server. There is a placeholder that will be replaced with the name of the person that is trying to join: <%USERNAME%>.
    We add:
    sql-query=SELECT name FROM tbl_names WHERE name\='<%USERNAME%>'
    5)Optional: If /whitelist add should be available in SQL mode, we have to specify a query for it:
    sql-query-add=INSERT INTO tbl_users (Id, Name, Waa, Naaa) VALUES (NULL, '<%USERNAME%>', '1', '2')
    6)Optional: If /whitelist remove should be available in SQL mode, we have to specify a query for it:
    sql-query-remove=DELETE FROM tbl_users WHERE Name\='<%USERNAME%>'

    Help, I get a 'class not found error'
    Put the following line in your whitelist.properties file: sql-driver-jar={path to the connector}
    The base path is the directory your craftbukkit.jar is placed in, so if you have named the connector "mysql-connector.jar" and placed it in the same directory as craftbukkit.jar you would add
    sql-driver-jar=mysql-connector.jar7

    Changelog:
    Version 0.2
    • Fixed error in my use of permissions. Added to bukkit forums.
     
    robbydude and NEO like this.
  2. Offline

    Shooty

    Awesom ! I'll try it !
     
  3. Offline

    NEO

    @codename_B

    I love the added sql/mysql support and the individual nodes for different commands BUT i would like to see an option to disable the "say hello to ____" message. We tend to have allot of people joining and leaving, which gets very spammy with just the simple "_____ Has joined the game" but now theres two messages.
     
  4. Offline

    codename_B

    I'll add an option in the config to disable this in v0.3

    Will work on it tomorrow.
     
  5. Offline

    Windwaker

    I herd u leik plus
     
  6. Offline

    codename_B

    lulz
     
  7. Offline

    msw1

    Best mod ever. Thank you.
     
  8. Offline

    codename_B

    Glad you find it useful, I came across a situation where a friend of mine needed to give "clan leaders" permission to whitelist people but he didn't want them to be able to remove people or have to op them. This fits the bill perfectly for that.
     
  9. Offline

    Plague

    please update to latest recommended CB
     
  10. Offline

    codename_B

    Done. It already was, I just hadn't fixed the title.
     
  11. Offline

    Plague

    Oh and changelog has to be at the end, moved.
     
  12. Offline

    2insane

    I'm a tad bit confused at the utility of this plugin. If I have two groups in Permissions- Guest and Member, and I want to make it so anyone that logs in and isn't on the whitelist defaults to the Guest group, but if they log in and are on the whitelist then they default to the Member group. Do I give the Guest group the permission whitelist.permission.bypass and make it default? Thanks for the help!
     
  13. Offline

    codename_B

    No. If you want to do that you don't want this plugin, or any other whitelist plugin. That is not a whitelist you describe, that's a greylist.

    Simply setup the permissions plugin so that "Guest" is the default group.

    Ask how to do this on the permissions thread, not here.
     
  14. Offline

    Shooty

    @codename_B can you add an option for desactivate the "but isn't on the whitlist..." ?
     
  15. Offline

    codename_B

    The source code is open source for a reason, do what you like with it :)
     
  16. Offline

    Shooty

    i'm just a french admin i'm not a developer... :(
     
  17. Offline

    codename_B

    I might release one in a while, after 1.6 is out
     
  18. Offline

    Shooty

    Thanks
     
  19. Offline

    xplosion545

    Do I set whitelist to false in the server.properties ? Because I get a message when people I whitelisted via your plugin: Say hello to [name], but they can't really connect.
     
    BlueShiftXD likes this.
  20. Offline

    Pyraah

    Hi,

    Will you to update this plugin ? :)
     
  21. Offline

    codename_B

    Depends, is it still working?
     
  22. Offline

    Pyraah

    It doesn't works. :)
     
  23. Offline

    codename_B

    Version, stacktrace, what doesn't work?
     
  24. Offline

    Crysillion

    Gonna try this out. I'll let you know if it's not working for me either, I'm using #818 so, let's see here...

    EDIT: On first load up it didn't generate the folder for some reason, maybe my server was just messing up (I did restart it), so I restarted it again and poof there the folder appeared. I tested the commands in-game and on a friends account who is not a moderator or anything of the sort (so no bypasses), upon trying to logon I was met with a message saying I was not on the whitelist.

    After typing in /whitelist add <the player name>, they could log on. I even tried removing their whitelist while they were ingame, it worked, and the next time they tried to log in, they were not allowed because they weren't on the whitelist.

    Plugin works fine. Again, using #818 build. I enabled the whitelist in MC's built-in whitelist just in case. Seems to be working fine, really. I see no issues.

    The only thing I would request is allowing the possibility for someone to join the server without being on the whitelist, but not being able to do basic things like build or break. I tried doing this with permissions and giving guests the .bypass, but not the build rights, but I encountered the brick wall that is transferring them from guest to member with whitelisting. Yeah, couldn't do it.

    Other than that, does it's job.
     
  25. Offline

    TheShadow777

    why no whitelust plugin use the white-list.txt :( i need a plugin that use the standard white-list.txt but bring ingame commands :(
     
  26. Offline

    HotelErotica

    Nice plugin! Love it, Just got it working with my newly setup phpBB forums! Also like someone else mentioned, Any plans of maybe being able to edit or turn off the messages?
     
  27. Offline

    Radza

    Hello, have question. Is posible to make IP whitelist? That only IP's in whitelist.txt can join the server. Problem is a ipchanger, and banned assholes just change they ip's and continuing terrorise my server.
    Thanks for reply
     
  28. Offline

    BlueShiftXD

    There is something wrong with your plugin! When I enable the plugin, 4 to 6 player can join then it says that the server is full even though there are 10 slots! Please fix this I don't like griefers :(
     
  29. Offline

    nutlnw7410

    maybe add a config to enable/disable on startup?
    p.s.i use your plugin for lockdown server (maintenance)
    like
    enable-on-startup=(true/false)
     
  30. Offline

    BioRage

    Thanks for this, works fine on 860.
     

Share This Page