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

    whoami

    Most likely you mix up a letter or ignore that the plugin is case sensitive. Meaning when you ban Player "XyZa" its a different Player than "xYzA" I'm going to fix that with the next release.
     
  3. Offline

    skyref

    Yes you have right, banning names work with case sensitive, but ip ban don't work, because if I ban somebody he can connect with new nickname(with the same IP and do what they want), so at the moment I turn my server to online mode.
     
  4. Offline

    whoami

    I just tested that. And it works for me:
    I connected, banned myself, changed my name and tried to connect again and the plugin correctly dennied access. Am I missing something?
     
  5. Offline

    l104693

    Hey I'm trying to use this plug-in but I have a few difficulties.
    Previously (1.6) I've been using "advanced Bans".
    Is it possible that you make it configurable that you don't ban ALL the ip's of a player but just the last one?
    Is it possible to change the commands? I hate the "e" in front of everything
    And I got an error when I did /ebaninfo on myself (maybe because I haven't banned someone?)
    Error:
    Code:
    20:30:20 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'eban
    info' in plugin EasyBan v0.6
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    98)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:726)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:691)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:684)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            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)
    Caused by: java.lang.NullPointerException
            at org.bukkit.craftbukkit.TextWrapper.wrapText(TextWrapper.java:38)
            at net.minecraft.server.NetServerHandler.sendPacket(NetServerHandler.jav
    a:642)
            at org.bukkit.craftbukkit.entity.CraftPlayer.sendRawMessage(CraftPlayer.
    java:88)
            at org.bukkit.craftbukkit.entity.CraftPlayer.sendMessage(CraftPlayer.jav
    a:92)
            at uk.org.whoami.easyban.EasyBan.onCommand(EasyBan.java:145)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    If you've fixed this small things, this will be a GREAT PLUGIN :D
     
  6. Offline

    whoami

    If you want to ban a single IP just ban that IP with the subnetban function:
    For example:
    Code:
    "/esubnetban 192.168.64.65/32"
    But I guess I could add someting like "/ebancurip playername" which bans only the current ip.

    You can use the alias function from craftbukkit to rename the commands to whatever you want.

    You found a bug I'll push an update asap.
     
  7. Offline

    skyref

    Earlier I change config to give another announce (translate them) plugin don't work. When I delete config and let create default it works :)
     
  8. Offline

    whoami

    Hm maybe you translated to much :) Only translate the parts right of the ":".
    e.g.
    Code:
    ' is not banned': ' is not banned'
    translated to german
    Code:
    ' is not banned': ' ist nicht gesperrt'
     
  9. Offline

    skyref

    Some rigts parts after " : " are '...' and some are without apostrophes, mayby I can translate only 1 of this. It is any difference?
     
  10. Offline

    whoami

    just put all your translations into apostrophes
     
  11. Offline

    Casier

    I love your Plugin !
    Its works for bukkit #935 but not for bukkit #953

    My log (open)
    01:40:57 [GRAVE] Could not pass event PLAYER_JOIN to EasyBan
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Ha
    shMap
    at uk.org.whoami.easyban.datasource.YamlDatasource.isNickBanned(YamlData
    source.java:201)
    at uk.org.whoami.easyban.EasyBanPlayerListener.onPlayerJoin(EasyBanPlaye
    rListener.java:42)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:244)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:321)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    Manager.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)


    I wait for EasyBan v0.8 :D
     
  12. Offline

    whoami

    I'm running EasyBan on #953. According to you logs it is most likely that you either did not correctly follow the update guide or forgot to delete an old version of the plugin from the plugins folder.
     
  13. Thankyou for adding the ability to ban a country.
    No longer shall my server be plagued by Italians!
     
  14. Offline

    whoami

    I had the same problem with Finns. That's why I added the function but as soon as I threatened to ban all of them they started to behave...
     
    AS1LV3RN1NJA likes this.
  15. I'm not sure the country ban is working, i need to ban everyone with 79. at the start of their IP, how would / can i do this?
     
  16. Offline

    whoami

    it is working here... You can install the "CountryLoginMessage" plugin and you will see everyone from a banned country is removed from the server.

    Code:
    /ebansubnet 79.0.0.0/8
    With this you ban more than 16 million addresses so think twice before using it :)


    And if for example you want to ban Italy:

    Code:
    /ebancountry IT
    Note that it is important to use "IT" and not "it".
     
    AS1LV3RN1NJA likes this.
  17. I'M FREE. I'M FINALLY FREE.
    :D Thankyou for this.
     
  18. Offline

    Paah

    Can we have command like /ealts <player> to show all playernames who have logged in from IPs in <player>'s history.
     
  19. /ehistory playername - List all ips of a player

    Wait, read your comment again. Not the same thing, sorry.
     
  20. Offline

    whoami

    Ok I put it on the to do list.
     
  21. Offline

    Techykid3

    Love the plugin, one error:

    Running CB #953
    Easyban 0.9
    Lots of other plugins
    One plugin is calling this error because of Easyban...
    xAuth v2.0 beta 3.5
    --------------------------------------------------------------------
    Code:
    2011-07-18 21:16:59 [INFO] [EasyBan] Ban for -------- detected
    2011-07-18 21:17:00 [SEVERE] Could not pass event PLAYER_JOIN to xAuth
    java.lang.NullPointerException
    	at com.cypherx.xauth.xAuth.protect(xAuth.java:169)
    	at com.cypherx.xauth.xAuth.createGuest(xAuth.java:156)
    	at com.cypherx.xauth.listeners.xAuthPlayerListener.onPlayerJoin(xAuthPlayerListener.java:62)
    	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:321)
    	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)
    2011-07-18 21:19:31 [INFO] [BBROTHER] Removed 995493 old records because of age in 20h00m00s.
    2011-07-18 21:20:01 [INFO] /96.126.97.111:51919 lost connection
    2011-07-18 21:21:59 [SEVERE] java.lang.NullPointerException
    2011-07-18 21:21:59 [SEVERE] 	at com.cypherx.xauth.xAuth$1.run(xAuth.java:149)
    2011-07-18 21:21:59 [SEVERE] 	at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-07-18 21:21:59 [SEVERE] 	at java.lang.Thread.run(Unknown Source)
    
     
  22. Offline

    whoami

    Yeah I talked to the xAuth guys about that but there is not much I can do. Afaik they fixed that already in their repository you just have to wait for a release by them.
     
  23. A new version every day it seems :p

    Any chance we could have /ealternative work with ip's aswell?
    e.g. /ealternative 213.106.206.107 comes up with everyone who accessed my server from my IP?
     
  24. Offline

    whoami

    After I had all the needed SQL statements fro hsql it just was a minor adjustment to also support mysql...

    Ok it is on the todo list for the next version
     
  25. Offline

    ALLix

    Good afternoon. Necessary to ban a range of ip 92.240.0.0 - 92.240.255.255

    what should I prescribe? 92.240.0.0/92.240.255.255 - does not work! thanks

    thought could be so right / ebansubnet 92.240.0.0/255.255.0.0 or /ebansubnet 92.240.0.0/16???
     
  26. Offline

    whoami

    Yes either one of the comands will ban 92.240.0.0 - 92.240.255.255.
     
  27. Offline

    ALLix

    Thank you very much! Plug-in great! Warm greetings from Russia! =)
     
  28. Offline

    Crash129

    Hm i don't understand how to ban a range like 12.23.*.*
    Is the command /ebansubnet 12.23/255.255 ?
     
  29. Offline

    whoami

    "/ebansubnet 12.23.0.0/255.255.0.0" or "/ebansubnet 12.23.0.0/16"
     
  30. /ealternative can now be used with a ip(request by AS1LV3RN1NJA)

    Nice :D You need to update the thread title.
     
  31. Offline

    Hydrosis

    Can you make it so that it tells you how much time you have left in your ban if you try to reconnect? I like how we can modify the messages, but can you add a line on top of the custom message saying something like this:

    Line1: You are banned. Reason: <reason here>. Time Left: <time left of ban>
    Line2: <Custom message that can be edited in the config>
     

Share This Page