[INACTIVE][GEN/SEC] SimpleBan 1.3 - Simple, but hardcore Ban(for Off-mode servers) [490-531]

Discussion in 'Inactive/Unsupported Plugins' started by AnjoCaido, Mar 11, 2011.

  1. Offline

    AnjoCaido

    SimpleBan - Simple, but hardcore ban directed for offline-mode server needs.
    Version: v1.3

    You need GroupManager(+FakePermissions) / Permissions to use this.

    Who has an Offline-mode server knows how hard it is to keep banned players away.
    In my opinion, it's easier to ban the most possible.
    You need to keep both usernames and IPs banned.
    And that's not enough, if a player changes names, or IP, you want to ban those too.

    Now you can do that automatically with one single command.

    Features:
    • Ban Name + IP with one single command.
    • Ban new IP automatically if a player connects with a name matching an already banned player.
    • Ban new player name automatically if matches an already banned IP. (if that name is connected for the first time on the server)
    • Ban Name + IP even if player is offline, because it creates an history of last-IP per username.

    Commands:
    Code:
    commands:
      sban:
        description: Ban player name and IP. (It has player name matching)
        usage: /<command> <playerName>
        permission: simpleban.sban
      sbanhistory:
        description: Ban a player which is not online using IP history.
        usage: /<command> <playerName>
        permission: simpleban.sbanhistory
      sbanip:
        description: Ban an specific IP.
        usage: /<command> <ip>
        permission: simpleban.sbanip
      sbanipfromname:
        description: Ban an specific IP using a player name.
        usage: /<command> <playerName>
        permission: simpleban.sbanipfromname
      sunban:
        description: Unban the player with given name.
        usage: /<command> <playerName>
        permission: simpleban.sunban
      sunbanip:
        description: Remove all matching IPs from ban list.
        usage: /<command> <ip>
        permission: simpleban.sunbanip
      sreload:
        description: Reload bans file.
        usage: /<command>
        permission: simpleban.sreload
    Latest Build Download:
    https://github.com/downloads/gmcouto/SimpleBan/SimpleBan.jar

    ChangeLog:
    1.3
    - Reduced time before kicks(50 ticks now = 2.5 seconds), to prevent banned people to nag your server.
    - Check if user still online when kicks.
    - Fixed a bug in /sunbanip and /sbanipfromname
    1.2
    - Trying to create a workaround to kick player and not give exceptions. (I created a delay of 5 seconds before every kick)
    1.1
    - Fixed permissions, which I forgot to check before executing commands.
    - Added some commands to ban only IPs… This is useful when you find someone using your username.


    ===========================================
    Source:
    https://github.com/gmcouto/SimpleBan
     
  2. Offline

    blinghung

    love it :/
     
  3. Offline

    crysis992

    Thats awesome ;)
    Thank you so much for this.

    An IP range ban command would be awesome, cause a user today changed permanent his IP.
    so Example: /sban 111.222.*
     
  4. Offline

    Spazmic

    Will try that! With the description it looks amazing. I like your work and ideas! [​IMG]
     
  5. Offline

    anon

    How does it stores stuff? Sqlite?
     
  6. Offline

    matan7890

    It's nice but player can change ip and enter with another name.. :S
     
  7. Offline

    AnjoCaido

    Seriously? I didn't know that. Please, tell me more.

    Still, this works much better than usual bans for offline-servers.
     
  8. Offline

    Racha

    Atleast, thanks a lot.. :D
    There is no other way to ban player if he changes IP and nick, if he dont stop griefing, just ban him till he no more comes in xD
     
  9. Offline

    Spazmic

    I love the plugin, it's simple and clean. But I get this error in the console everytime a banned played try to connect. I banned him with /sban.


    Code:
    03:48:11 [SEVERE]       at org.anjocaido.simpleban.SimpleBan.generalBanCheckActi
    on(SimpleBan.java:349)
    03:48:11 [SEVERE]       at org.anjocaido.simpleban.SimpleBanPlayerListener.onPla
    yerJoin(SimpleBanPlayerListener.java:33)
    03:48:11 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader$1.execute(Jav
    aPluginLoader.java:162)
    03:48:11 [SEVERE]       at org.bukkit.plugin.RegisteredListener.callEvent(Regist
    eredListener.java:59)
    03:48:11 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.callEvent(Simpl
    ePluginManager.java:255)
    03:48:11 [SEVERE]       at net.minecraft.server.ServerConfigurationManager.a(Ser
    verConfigurationManager.java:98)
    03:48:11 [SEVERE]       at net.minecraft.server.NetLoginHandler.b(NetLoginHandle
    r.java:87)
    03:48:11 [SEVERE]       at net.minecraft.server.NetLoginHandler.a(NetLoginHandle
    r.java:68)
    03:48:11 [SEVERE]       at net.minecraft.server.Packet1Login.a(SourceFile:46)
    03:48:11 [SEVERE]       at net.minecraft.server.NetworkManager.a(SourceFile:230)
    
    03:48:11 [SEVERE]       at net.minecraft.server.NetLoginHandler.a(NetLoginHandle
    r.java:34)
    03:48:11 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile
    :87)
    03:48:11 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServe
    r.java:357)
    03:48:11 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:272)
    03:48:11 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:366)
    03:48:11 [SEVERE] java.lang.IllegalStateException: Failed to remove player. net.
    minecraft.server.EntityPlayer@28c(Scout at 0.0,72.0,0.0) isn't in chunk 10, 10
    03:48:11 [SEVERE]       at net.minecraft.server.PlayerInstance.b(PlayerInstance.
    java:49)
    03:48:11 [SEVERE]       at net.minecraft.server.PlayerManager.b(PlayerManager.ja
    va:101)
    03:48:11 [SEVERE]       at net.minecraft.server.ServerConfigurationManager.c(Ser
    verConfigurationManager.java:114)
    03:48:11 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHand
    ler.java:96)
    03:48:11 [SEVERE]       at org.bukkit.craftbukkit.entity.CraftPlayer.kickPlayer(
    CraftPlayer.java:122)
    03:48:11 [SEVERE]       at org.anjocaido.simpleban.SimpleBan.kickBanWarning(Simp
    leBan.java:257)
    03:48:11 [SEVERE]       at org.anjocaido.simpleban.SimpleBan.generalBanCheckActi
    on(SimpleBan.java:349)
    03:48:11 [SEVERE]       at org.anjocaido.simpleban.SimpleBanPlayerListener.onPla
    yerJoin(SimpleBanPlayerListener.java:33)
    03:48:11 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader$1.execute(Jav
    aPluginLoader.java:162)
    03:48:11 [SEVERE]       at org.bukkit.plugin.RegisteredListener.callEvent(Regist
    eredListener.java:59)
    03:48:11 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.callEvent(Simpl
    ePluginManager.java:255)
    03:48:11 [SEVERE]       at net.minecraft.server.ServerConfigurationManager.a(Ser
    verConfigurationManager.java:98)
    03:48:11 [SEVERE]       at net.minecraft.server.NetLoginHandler.b(NetLoginHandle
    r.java:87)
    03:48:11 [SEVERE]       at net.minecraft.server.NetLoginHandler.a(NetLoginHandle
    r.java:68)
    03:48:11 [SEVERE]       at net.minecraft.server.Packet1Login.a(SourceFile:46)
    03:48:11 [SEVERE]       at net.minecraft.server.NetworkManager.a(SourceFile:230)
    
    03:48:11 [SEVERE]       at net.minecraft.server.NetLoginHandler.a(NetLoginHandle
    r.java:34)
    03:48:11 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile
    :87)
    03:48:11 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServe
    r.java:357)
    03:48:11 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:272)
    03:48:11 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:366)
    03:48:11 [INFO] ºcThe player Scout has been kicked because is banned!
    03:48:11 [WARNING] Can't keep up! Did the system time change, or is the server o
    verloaded?
    
    It works but, it spams the console and the can't keep up message shows up... :S

    Running CB 531 with anjosecurity and GM
     
  10. Offline

    anon

    Anjo, I tested something, as on my server everyone can issue /sban, even if they dont have the permission node!

    I use latest groupmanager. No console errors or anything
     
  11. Offline

    Spazmic

    I confirm this
     
  12. Offline

    AnjoCaido

    Version 1.1 with the permission fix and little new commands.
    [MERGETIME="1300105119"][/MERGETIME]
    Yeah. I was crazy about that error. Because no one knew why it happens.

    But...

    Someguy on another thread about that error found out it's because the kick happens before the player is inside the world... and the right way to kick is on PlayerLogin.

    The problem is that the PlayerLoginEvent happens before the player have an IP assigned on bukkit... so I can't test him there the way I want.

    The workaround I created is to kick the player around 5 seconds(100 ticks) after any ban/kick by this plugin. It should be enough to kick without errors(not sure if slow connections make 5 seconds not be enough). It's a lousy workaround, but it's what I got for now.

    Someday, when CraftBukkit get player IP on Login, we can make this plugin do the right way.
     
  13. Offline

    Spazmic

    You can't work with ressources you don't have, I understand. Thanks for your work, will try the new fix right now :)
     
  14. Offline

    anon

    Hmm, can u lower the 5 seconds time? People can eneter my server, say a world and gets kicked.
    Its pretty annoying, like

    WTF
    left the game
    joined the game
    im being banned
    left the game
    joined the game
    left the game
    joined the game
    UNBAN PLEASE
    left the game
    joined the game
    UNBAN ME PLEASE
    left the game
     
  15. Offline

    AnjoCaido

    I reduced the time to half... hope it helps.

    I really can't do much... because I really need to kick while blind in the dark, with that "delay". I hope a shorter delay will solve the issue.
     
  16. Offline

    Jorrdan

    Request:

    Can you please please please implement a whitelist feature for SimpleBan where you can set it so if someone logs in to your character from a different ip it bans them instantly? But have it configurable so this only happens on some characters (the admins).

    I think this would help a ton of people out, especially the ones playing in offline mode.

    Edit:
    Also, why not make the ip logging ALL of the known ip's a user has logged in to? Perhaps on a seperate log file. It could say the first, second, third ect ip a user has used.

    Thanks
     
  17. Offline

    TheDarkness73

    What are the commands for this mod?
     
  18. Offline

    Spazmic

    Code:
    commands:
      sban:
        description: Ban player name and IP. (It has player name matching)
        usage: /<command> <playerName>
        permission: simpleban.sban
      sbanhistory:
        description: Ban a player which is not online using IP history.
        usage: /<command> <playerName>
        permission: simpleban.sbanhistory
      sbanip:
        description: Ban an specific IP.
        usage: /<command> <ip>
        permission: simpleban.sbanip
      sbanipfromname:
        description: Ban an specific IP using a player name.
        usage: /<command> <playerName>
        permission: simpleban.sbanipfromname
      sunban:
        description: Unban the player with given name.
        usage: /<command> <playerName>
        permission: simpleban.sunban
      sunbanip:
        description: Remove all matching IPs from ban list.
        usage: /<command> <ip>
        permission: simpleban.sunbanip
      sreload:
        description: Reload bans file.
        usage: /<command>
        permission: simpleban.sreload

    You can see that commands are:
    /sban
    /sbanhistory
    /sbanip
    ... etc

    To Anjo, IP range ban (ex: 192.168.*) would be awesome :)
     
  19. Offline

    blackmist

    Does this happen to clash with the Jail plugin? :eek:
     
  20. Offline

    crysis992

    MySQL Support would be nice, so i can implement it into my mIRC ban script.
     
  21. Offline

    blackmist

    The plugin doesnt seem to work I'm using CB 556, nothing happens when I use the command.
     
  22. Offline

    Jorrdan

    It works fine on 556, and also 560. Anjo, can you please update this to 600+?
     
  23. Offline

    piousminion

    Yes, please update to 600+. Preferably 617+
     
  24. Offline

    Kresnik002

    Need this update, all my ban list uses this plugin and everyone is unbanned
     
  25. Offline

    mkaster

    I also would like to enjoy your plugin in build 617+ Update it please!
    [​IMG]
     
  26. Offline

    desmin88

    @mkaster
    That error doesn't mean the plugin wont work.
     
  27. Offline

    The PC Tech Guy

    As well as the plugin attempting to ban (via a timed kick), maybe it could log the player ips in one txt file and player names in another text file, then server administrators can, on restart, simply have them replace the banned-ips.txt and banned-players.txt files for a complete ban. And Groupmanager dependency could be optional, defaulting to ops.txt
     
  28. Offline

    Ahfaichucky

    could anyone update it to work with rb 670
     
  29. Offline

    CrazeX

    Workin On It
     
  30. Offline

    Plague

    Don't use a plus sign in the version tag. If you really need to use more versions, use [X-Y] or [X,Y].
     

Share This Page