[ADMN/SEC]BanReport v1.7 Ban, Kick and Block IP while saving information on why. [1337]

Discussion in 'Inactive/Unsupported Plugins' started by mahoutsukaii, Nov 4, 2011.

  1. Offline

    mahoutsukaii

    BanReport 1.7
    LOOK TOWARDS devBUKKIT for DOWNLOAD and SUPPORT!
    http://dev.bukkit.org/server-mods/banreport/
    https://www.dropbox.com/s/kt274yt6xvu61cd/BanReport.jar

    All this plugin does is force unwanted players to leave, either by banning them, kicking them, temporary banning them or IP-banning them. If you like, you can allow them to return by unbanning them.
    This plugin will also report all the locations and notes an administrator has given on a banned player, and allows quick access to teleport to these locations to investigate (if required).

    List of commands:
    Show Spoiler

    /ban [player] {-s} [reason] - Bans player [player] permanently from the server, and gives them a nice message each time they try to log in. If -s is added, the ban will be silent to the other players currently online. If a player is already banned, it will add additional information with [reason].

    /tempban [player] {-s} [time] [reason] - Temporarily bans a player from the game. Time is given with an integer, followed by a unit, which is either s, m, h, or d. For example, /tempban nublet 30m spamming. Will ban player nublet for 30 minutes.

    /kick [player] {-s} [reason] - kicks a player from the game with a friendly reason. The player will be able to instantly rejoin.

    /banip [player] OR [IP] - blocks any account with a specific IP address from joining the game. /banip nublet will ban nublet, and ban his ip, whilst /banip 53.67.32.11 will block any accounts that try to sign in with 53.67.32.11 as their IP.

    /baninfo [player] - Recalls information about banned player [player]. Will list the reason they were banned for, and any additional notes that have been added.

    /addinfo [player] [information] - Adds additional information regarding a banned player. This will log the coordinates of where you are standing as well.

    /removeinfo [player] [id] - removes an 'additional info' entry from the database. Useful if you make a mistake.

    /bantp [player] [id] - Teleports you to the location of where the additional information with id [id] was made. Useful for investigations.

    /banexport - Exports the database to banned-players.txt.

    /banimport - Imports from banned-players.txt to the database.


    Permissions:

    Here are the permission nodes:
    Show Spoiler

    banreport.ban - required for /ban, /tempban
    banreport.baninfo - required for /baninfo /addinfo, /removeinfo
    banreport.bantp
    banreport.io - required for /banexport and /banimport
    banreport.kick
    banreport.unban
    banreport.banip


    Setting up:
    BanReport runs off a MySQL database, and the query for the required table is this:
    Show Spoiler

    CREATE TABLE `banlist` ( `name` varchar(32) NOT NULL , `reason` varchar(4096) NOT NULL , `admin` varchar(32) NOT NULL , `time` timestamp NOT NULL , `temptime` timestamp NOT NULL , `IP` varchar(15) NULL , `additional` varchar(4096) NOT NULL ) ;
    Final notes:
    • This plugin was heavily influenced by KiwiAdmin, as you can probably tell from the formatting.
    Changelog:

    Version 1.7
    Fixed tempban not parsing correctly (why it came up, I have no idea)
    Version 1.6
    Fixed arguments not being required
    Version 1.5
    Fixed name capitalisation issue

    Version 1.4
    Fixed PermissionsEx

    Version 1.3
    Fixed SQLite not creating table correctly

    Version 1.2
    Added SQLite support

    Version 1.1
    Fixed permissions

    Version 1.0
    uploaded
     
  2. Offline

    Adrenaline

    PermissionsEX support?

    SQlite need :) can you add in next updates?
     
  3. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    @mahoutsukaii "Permissions" is an abandoned and replaced plugin. You shouldn't be using it for your permissions checks.

    Instead, you can support all the current permission plugins by doing this check in your code to see if a player has a perm:

    Code:java
    1. player.hasPermission("permission.node")

    For instance
    Code:java
    1. player.hasPermission("banreport.ban")


    That's much easier for you to code, as you don't need to check to see if the Permissions plugin is there. And it's easier for server admins because it supports the bukkit standard.
     
  4. Offline

    mahoutsukaii

    Thanks for the permissions help. I'll be sure to replace all my permission checking with this. As for the SQlite, I'll see what I can do.

    EDIT:
    Updated .jar to cater for permissions ;D

    EDIT 2:
    @Adrenaline Added SQLite support
     
    Adrenaline likes this.
  5. Offline

    Adrenaline

  6. Offline

    Adrenaline

    Repair it !

    Build:
    #1380


    After kicking / temp baning players, only receive "End of Stream" and this below error

    PHP:
    2011-11-05 10:34:36 [SEVEREnull
    org
    .bukkit.command.CommandExceptionUnhandled exception executing command 'tempban' in plugin BanReport v1.1
        at org
    .bukkit.command.PluginCommand.execute(PluginCommand.java:42)
        
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
        
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:361)
        
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
        
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
        
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
        
    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:92)
        
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:500)
        
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused byjava.lang.NumberFormatException: For input string""
        
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        
    at java.lang.Long.parseLong(Long.java:453)
        
    at java.lang.Long.parseLong(Long.java:483)
        
    at jadon.mahoutsukaii.plugins.banreport.BanReport.tempBan(BanReport.java:513)
        
    at jadon.mahoutsukaii.plugins.banreport.BanReport.onCommand(BanReport.java:152)
        
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
        ... 
    13 more
    Same for banning.. only receive "end of stream" but without errors
     
  7. Offline

    mahoutsukaii

    @Adrenaline

    Can I please have a look at your config.yml file?

    Also, that tempban error is caused by an incorrect time format. Are you doing (for example) /tempban player 10s reason ?
     
  8. Offline

    Adrenaline

    I type: /tempban nick reason time


    PHP:
    mysql-database'jdbc:mysql://localhost:3306/****'
    mysql-user'****'
    mysql-password'****'
    mysql-table: ****

    broadcast:
        
    Ban"&6Player &e%victim%&6 zostal zbanowany przez &e%admin%&6! Powod: &e%reason%"
        
    Kick"&6Player &e%victim%&6 zostal wyrzucony przez &e%admin%&6! Powod: &e%reason%"
        
    TempBan"&6Player &e%victim%&6 otrzymal bana czasowego przez &e%admin%&6 na &e%time% &6Powod: &e%reason%"
        
    Unban"&e%victim%&6 zostal odbanowany przez &e%admin%&6!"
    user:
        
    Ban"Zostales zbanowany permanentnie przez admina %admin%. Powod: %reason%"
        
    Kick"Zostales wyrzucony przez admina %admin%. Powod: %reason%"
        
    TempBan"Otrzymales bana na %time% przez admina %admin%. Powod: %reason%"
        
    IPBan"Twoje IP zostalo zbanowane."
     
  9. Offline

    Windwaker

    You're tags should be between one set of brackets: [ADMN/SEC]
     
  10. Offline

    mahoutsukaii

    It should be /tempban nick time reason
     
  11. Offline

    Adrenaline

    Know but you must fix it :d
     
  12. Offline

    Adrenaline

    Next issue.. i ban player and after a few second banned player come back -_-
     
  13. Offline

    bobbysmithyy

  14. Offline

    tom

    Very nice :)
     
  15. Offline

    MetalMadness

    Using permissionsex, and not working. I am not getting any errors on the console
     
  16. Offline

    mahoutsukaii

    are you using MySQL or SQLite?
     

Share This Page