Inactive [ADMN/SEC] EasyBan v2.1 - Ban people/subnets/countries from "offline" Servers [1185]

Discussion in 'Inactive/Unsupported Plugins' started by whoami, Jun 6, 2011.

  1. Offline

    whoami

    Please use BukkitDev for bug reports/feature requests:
    http://dev.bukkit.org/server-mods/easyban/

    EasyBan - Ban people/subnets/countries from "offline" Servers:
    Version: v2.1

    With this plugin you can ban griefers and other annoying people from your "offline" Server. To combat dynamic IPs EasyBan keeps track of players IP addresses and saves them into a file. Additionally you can ban entire subnets and/or countries if necessary. You can also add different DNSBL to block unwanted client hosts(open proxies, tor exit nodes, and much more)
    The plugin has support for PermissionsBukkit(Superperms) and Permissions. Without a Permissions plugin it defaults to op.

    Features:
    • Kick and ban players and all their IP addresses
    • Temporary bans
    • Ban entire subnets
    • Ban entire countries
    • Ban hosts with the help of DNSBL
    • Customize plugin messages
    • IPv6 support
    • YAML, HSQLDB and MySQL database support
    Download:
    http://dev.bukkit.org/server-mods/easyban/files/9-v2-1-cb-1185/
    Source Code:
    https://github.com/whoami-plugins/EasyBan

    Usage:
    Code:
    /ekick playername [reason] - Kick a player
    /ehistory playername - List all ips of a player
    /ealternative playername or ip - List all nicknames used by a player/show all players that connected from one ip
    /eban playername [reason] [time] - Ban a player. When time is given the player will be banned for [time] minutes
    /eunban playername - Unban a player
    /ebaninfo playername - Show informations about a ban
    /elistbans - List all banned players
    /elisttmpbans - List all temporary bans
    /ebansubnet networkprefix/subnetmask [reason] - Ban a subnet(e.g. /esubnetban 24.64.23.0/255.255.252.0 or 24.64.23.0/22 or 2001:470:1f09:e26::/64)
    /eunbansubnet networkprefix/subnetmask - Unban a subnet
    /elistsubnets - List all banned subnets
    /ebancountry countrycode - Ban a country(Country codes can be found here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
    /eunbancountry countrycode - Unban a country
    /elistcountries - List all banned countries
    /ewhitelist playername - Whitelist a player; Useful when a range ban hits an innocent
    /eunwhitelist playername - Remove player from whitelist
    /elistwhite - List all whitelisted players
    
    Country bans:
    Country bans are a optional feature just install the GeoIPTools plugin and they work.

    YAML:
    The YAML data backend is the default and doesn't need any configuration

    HSQLDB (open)

    To use the HSQL database download this.
    Create a "lib" directory in your server root and copy the downloaded file to that directory. Open the config.yml in plugins/EasyBan/ and replace "database: yaml" with "database: hsql"

    MySQL (open)

    To use MySQL as data backend download this.
    In that zip archive is a "mysql-connector-java-${VERSION}-bin.jar" file. Rename that file to "mysql-connector-java-bin.jar" and move it to the "lib" directory in your craftbukkit root folder. When the "lib" folder doesn't exist create it. Now create a database with a name of your choice.
    Open the config.yml in plugins/EasyBan/ and replace "database: yaml" with "database: mysql". Additionally you have to add these 5 settings:
    Code:
    schema: 'XYZ' #database name(when not given it defaults to 'easyban')
    host: 'XYZ'  # MySQL Server address
    port: 'XYZ'  # MySQL Server port
    username: 'XYZ' # MySQL user
    password: 'XYZ' # password for that user


    Permissions:
    Code:
    easyban.${command} (e.g. easyban.ekick)
    Custom Messages:
    After the first start you'll find a messages.yml in "plugins/EasyBan/". To edit a message just change the part right of the ":".

    Update from <0.6 to 0.6 or higher
    Show (open)

    The layout of the bans.yml has changed and needs minor adjustments. Open bans.yml in an editor and change in the bans and subnets sections the lists to maps:

    Example:
    Old Layout:
    Code:
    bans:
    - Pink
    - miau
    - deesck
    subnets:
    - 84.19.169.160/255.255.255.240
    - 84.19.165.208/255.255.255.240
    - 192.168.0.0/255.255.0.0
    New Layout:
    Code:
    bans:
        Pink: {}
        miau: {}
        deesck: {}
    subnets:
        84.19.169.160/255.255.255.240: {}
        84.19.165.208/255.255.255.240: {}
        192.168.0.0/255.255.0.0: {}
    

    Changelog:
    Version 2.1
    • added support for DNSBL
    Version 2.0
    • fixed #2
    • new configuration options
    More (open)

    Version 1.9
    • fixed #4
    • code cleanup
    Version 1.8
    • improved SQL code
    • player sees the reason for his kick/ban and for how long he was banned
    • added infos to plugin.yml
    Version 1.7
    • readded support for Permissions. If Permissions and PermissionsBukkit are installed Permissions will be used)
    Version 1.6
    • dropped support for Permissions
    • added support for PermissionsBukkit
    Version 1.5
    • Added configure option for mysql database schema
    • fixed MySQL temporary ban bug
    Version 1.4
    • /ealternative can now be used with a ip(request by AS1LV3RN1NJA)
    Version 1.3

    • MySQL support
    Version 1.2

    • HSQLDB support
    • Whitelist also works for subnet bans
    Version 1.1

    • GeoIPTools support
    Version 1.0

    • Added /ealternative command
    • Whitelist only works for country bans
    Version 0.9

    • Added country bans
    • Added a white list
    • Code cleanup
    • Renamed a few commands for consistency(esubnetban -> ebansubnet, esubnetunban -> eunbansubnet, elistips -> ehistory)
    • Moved messages form config.yml to messages.yml (custom messages will be copied automatically)
    • All actions are properly logged to console
    Version 0.8


    • Added temporary bans
    Version 0.7


    • Added missing message(thanks @l104693 for the report)
    Version 0.6


    • Reasons for bans
    • Saves who banned someone
    Version 0.5


    • Ignore case of commands
    Version 0.4


    • List commands
    Version 0.3


    • IPv6 Support
    • Thread safe
    • Ban subnets with CIDR notation
    • Messages moved to config.yml
    Version 0.2


    • Release
    Version 0.1


    • Internal test version
     
    efstajas, lastern and AS1LV3RN1NJA like this.
  2. Offline

    JohnPulse

    Hi, first of all thank you for this awesome plugin. The country ban was just what I was looking for. :)

    Anyway, I'm having a small issue...

    I banned a country on my server, and when someone of that country tries to connect, I see the message "Player Left" and then the message "Player Join". The problem with this is that the Player stays connected on the Spawn (he is not there, but the char stays there idling until I kick him).

    I also run the xAuth plugin on my server, can it be from it?

    Regards,
    John
     
  3. Offline

    l104693

    Is it possible to configure your own table? That way I could easily convert from Advanced Bans.
     
  4. 19:17:29 [INFO] [EasyBan] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT player_id FROM player WHERE player='PlayerName')' at line 1
    I think maybe player_id has to be VARCHAR(20) instead of INTEGER, but that is a noob's guess. I wish I knew how to compile the source to try a fix.
    The problem here is that the name doesn't enter the Mysql database and so /elistwhite draws a blank. Nothing in the table itself either, and the player is not really whitelisted although it does announce it in game.
    Thank you for an awesome plugin, some people think they have unlimited ip addressses. This plugin is very satisfying.
     
  5. Offline

    whoami

    First of all sorry for not answering but i was on vaccation.

    I will do that.

    I haven't seen this behavior yet but I'll try to fix it.

    No. I dont think my table layout is compatible with Advanced Bans.

    The integer is correct. Had the user tried to connect before you wanted to whitelist him? That is neccesary so that the database "knows" him. Only after he got auto kicked once he can be whitelisted.

    [/quote]
     
  6. Offline

    Monopol

    Sorry for that dumb question, but how can you ban someone permanently? I've tried already 0, but that didn't work for me.
     
  7. Offline

    Hydrosis

    You don't put a number. I thought it was zero at first, too haha (because I use advanced bans). So you'd just do /eban [player] [reason]

    If this can be a little more like advanced bans, I'd use this plugin (colors, global notifications, make it /eban [player] [time] [reason] so you can have more than a few words, ect.) The only problem I have with advbans is that sometimes the bans get messed up and it doesn't IP ban the person as well.
     
  8. Offline

    Monopol

    This doesn't work either. If I ban someone like that, this person is immediately able to join again.
     
  9. Offline

    MiniKahn

    Hello, i have a little "bugreport",

    When a subnet banned User join with my name,(I use the AuthMe Plugin) i was kicked out from the game with message " You are login from an other Location"...
    The subnet banned user Join and where kicked automaticaly.
    Can you put into your Code that a Subnet banned User, can't join and do not kick others from the Server?

    Sry 4 my bad inglish!
     
  10. Offline

    JohnPulse

    From the console output I guess that the blame is from the xAuth plugin...

    Code:
    2011-08-13 14:50:36 [INFO] Creating empty config: D:\Minecraft\plugins\Essentials\userdata\-NICK REMOVED-.yml
    2011-08-13 14:50:36 [INFO] -NICK REMOVED- [/-IP REMOVED-:61657] logged in with entity id 160898 at ([world] -6.5, 69.62000000476837, 16.5)
    2011-08-13 14:50:36 [INFO] [EasyBan] Player -NICK REMOVED- from banned country -COUNTRY REMOVED-
    2011-08-13 14:50:36 [INFO] [MultiInv] New player detected: -NICK REMOVED-
    2011-08-13 14:50:36 [SEVERE] Could not pass event PLAYER_JOIN to xAuth
    java.lang.NullPointerException
        at com.cypherx.xauth.xAuthPlayer.getPlayer(xAuthPlayer.java:96)
        at com.cypherx.xauth.xAuth.createGuest(xAuth.java:241)
        at com.cypherx.xauth.listeners.xAuthPlayerListener.onPlayerJoin(xAuthPlayerListener.java:67)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:124)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:74)
        at net.minecraft.server.Packet1Login.a(SourceFile:43)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:40)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  11. Offline

    iFreZzAx

    I set up Mysql but now everytime I use /eban playername after a few minutes it says "Temporary for playername has been removed like it was a temp ban :/
    Any help ? please
     
  12. Offline

    iFreZzAx

    Were you using Mysql ? by any chance.
     
  13. Offline

    Monopol

    Right, I'm using MySQL.
     
  14. Offline

    iFreZzAx

    Same thing is happening to me when I try to use MySQL when set to yaml it works as it should.
     
  15. Offline

    dog.big

    same issue there
     
  16. Offline

    iFreZzAx

    Ah this sucks least that confirms my thoughts that its not my end. So @whoami Any fix gonna come out on this ?
     
  17. How hard would it be to whitelist a country, so instead of banning dozens of countries just to have a solution for a server, say accessible only from north american countries, for the sake of low average ping.
    Problem is players with delay from the other side of the world make for poor pvp experience.
     
  18. Offline

    FarSideX

    Can I ban someone from using an IP or subnet but still allow them to use other IPs or subnets with completely banning the IP or subnet?

    ie:
    PlayerX can use xxx.xxx.xxx.xxx but not yyy.yyy.yyy.yyy and PlayerY can use yyy.yyy.yyy.yyy but not xxx.xxx.xxx.xxx
     
  19. Offline

    Qentus

    hi, can you add to this plugin a way to change the name of DB (MySQl)? I cant have db with a name easyban and i cant edit plugin for different name of DB.
     
  20. Offline

    ghost0001

    @FarSideX there is already a plugin that does just that. One IP per name and one name per IP. The name eludes me right now. But i believe its in the security plugins.
     
  21. Offline

    FarSideX

    Yes I did see that plugin but I need to allow more than 1 IP per player. Many of my members play during their lunchbreak at work and also from home.
    Also some members play from the same IP at the same time. Either way that plugin does not help.
    I need a little more flexibility than it provides.
     
  22. Offline

    whoami

    Ok Im back I was very busy with rl so I could not take care of my bukkit plugins but that will change now...

    I will take a look at the MySQL code

    That is very complex and not within the scope of this plugin...
    But as it is OpenSource patches are welcome :)

    Can you MySQL users please test if this is working for you: https://stuff.whoami.org.uk/easyban/1.5/EasyBan.jar

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  23. Offline

    Monopol

  24. Offline

    iFreZzAx

    Me either.
     
  25. How can i ban just one ip?
     
  26. Offline

    JohnPulse

    For example:
    /ebansubnet [IP to be banned]/255.255.255.255
    Regards,
    John
     
  27. Will 1.6 still work with permissions 2.x?
     
  28. Offline

    whoami

    No but you can use 1.5. At the moment 1.5 and 1.6 have the same features except the Permissions system. If needed i can backport future changes from 1.6 to a legacy 1.5 version.

    I figured that with the Permissions plugin being inactive and with PermissionsBukkit being the new official way for Permissions I rather support the new way :)

    Also you should take a look at the SuperpermsBridge from the PermissionsBukkit site. It's bridge that lets you use plugins that only support Permissions with PermissionsBukkit.
     
  29. If it isn't too much hassle, could you re-add it in the next update?
    A little busy at the moment (a lot of server problems recently, plus 1.8 out soon and going back to school), so it isn't the best time to be switching to a new permissions system.

    Edit: An /ehelp command would also be a nice feature, for the newly Op'd.
    Thanks for the great plugin :)
     
  30. Offline

    dog.big

    Hello,
    could you please keep support for Permissions as a lot of servers and plugins use it. Please :(. Thanks.
    Btw perm. bans are fixed.

    regards
     
  31. Offline

    Dauphin14

    Your plugin is excellent, really. But please, make-it compatible with xAuth (Bukkit 1060) ! xAuth's developpers saided you really should use PLAYER_PRELOGIN instead of PLAYER_JOIN, please use it !

    Thanks.
    Dauphin14.
     

Share This Page