[INACTIVE] [ADMN] KiwiAdmin 2.2 - ban/tempban/kick/ipban, (MySQL or txt) [670-1158]

Discussion in 'Inactive/Unsupported Plugins' started by yottabyte, Jan 23, 2011.

  1. Offline

    yottabyte

    This plugin is no longer being updated for the public. The source is still being updated though, grab that and use it if you want to. Note that you might need to change some hard coded database names and such. (Advanced users only, basically)
    https://github.com/yottabyte/KiwiAdmin

    If you wish to continue the plugin in some form, please contact me first.

    things (open)

    KiwiAdmin 2.2
    Built against Craftbukkit #1000


    Hello people, I'm releasing my first public plugin!
    This is a very simple plugin, it adds the banning and kicking stuff for more people than just ops!

    KiwiAdmin requires either the Permissions or the GroupManager plugin!

    Features
    • Banning
    • Kicking
    • Unbanning
    • IP bans
    • Reloading banlist from either flatfile or database
    • MySQL support!
    • All actions are broadcasted to the people!
    • Case insensitivity!
    • Partial names support
    • 100% custom messages with colors
    • Temporary bans
    • Stores kicker, time, reason etc.
    • PHP script for a public banlist table. Example
    Partial names for /kick, /tempban, /ipban and /ban is optional although it is highly recommended as it seems like Bukkit has a built in feature where it can recognize a player just from the first part of their name. Eg. you ban player with "/ban playe", the ban will then be stored as playe and player will still be able to log in.


    In permissions, add these:

    Code:
    kiwiadmin.ban - Ban players
    kiwiadmin.kick - Kick players
    kiwiadmin.kick.all - Kick all players
    kiwiadmin.unban - Unban a player
    kiwiadmin.reload - Reload from the database
    kiwiadmin.tempban - Temporarily ban a player
    kiwiadmin.ipban - IP ban a player
    kiwiadmin.export - Export banlist
    
    Commands are simple:
    Code:
    /ban [player] (reason) - Ban a player, the reason will be in the kick message.
    /kick [player] (reason) - Kick a player, the reason will be in the kick message.
    /kick * (reason) - Kick all players on the server
    /tempban [player] [time] [sec/min/hour/day/week/month] (reason)
    /unban [player] - Unban a player
    /ipban [player] (reason)
    /reloadka - Reload KiwiAdmin from banlist.txt
    /checkban [player] - check if a player is banned
    /exportbans - export all bans to banned-players.txt
    
    If using flatfile, bans are stored in /plugins/KiwiAdmin/banlist.txt.
    IP bans are stored in plugins/KiwiAdmin/iplist.txt

    If you are using MySQL, run this query:
    Code:
    CREATE TABLE  `banlist` (
      `name` varchar(32) NOT NULL,
      `reason` text NOT NULL,
      `admin` varchar(32) NOT NULL,
      `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `temptime` TIMESTAMP NOT NULL ,
      PRIMARY KEY (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    CREATE TABLE  `banlistip` (
      `name` varchar(32) NOT NULL,
      `ip` varchar(15) NOT NULL,
      PRIMARY KEY (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    You will also need the Connector/J in your root bukkit folder just like all other MySQL plugins!

    Using the php viewer
    You can download the php file here.
    Open it in any notepad style program and change the database settings. Save and upload to website!

    Updating from 1.x
    If you have a database from KiwiAdmin 1.x you have to run
    Code:
    ALTER TABLE  `banlist` ADD  `temptime` TIMESTAMP NOT NULL ;
    Updating database from 2.0 to 2.1
    2.1 introduces IP bans, you have to create this table to use them
    Code:
    CREATE TABLE  `minecraft`.`banlistip` (
      `name` varchar(32) NOT NULL,
      `ip` varchar(15) NOT NULL,
      PRIMARY KEY (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    [​IMG] Download
    Source (not updated too often)

    Update 2.2
    • Fixed /kick *
    • Added /exportbans
    Changelog (open)


    Update 2.1
    • Added IP bans
    Update 2.0

    • Almost completely rewrote the entire plugin
    • Added temporary bans, full flatfile support
    • New configuration file
    • Added customizable messages!
    • Now displays ban reason when player tries to log in
    Update 1.2

    • Added partial names support for kicking and banning.
    • Fixed the kicking message when banning showing "Reason:" although there were no reason. (Only for MySQL users)
    Update 1.1

    • Reverted back to normal commands, /ban, /kick and /unban
    • More case insensitivity improvements. The banlists are no longer lower case only.
    • Fixed the ugly blank lines in the txt file if using flatfile
    Update 1.0


    • MySQL support!
    • Cleaned up A LOT of code.
    Update 0.5


    • Removed TSLPC
    • Added console commands support. These will be displayed as "server" eg. "yottabyte has been kicked by server!"
    Update 0.4


    • Updated to work with version 183+
    • Reformatted the commands to avoid interfering with the vanilla commands.
    Version 0.3


    • Added /unban
    • Added /reloadka - reloads the banlist from banlist.txt
    Version 0.2


    • When a player is kicked or banned, a global message is sent. Includes reason if there is one.
    • Changed PLAYER_JOIN to PLAYER_LOGIN, banned players are now kicked before they enter the server.

     
    losdamianos, malex, zcleaver and 3 others like this.
  2. Offline

    kamild1996

    I'm having a problem with web ban list... When i turn on page with bans, it's looking like this:
    Please help!
     
  3. Offline

    Hayaku

    English - you must edit your banlist.php because you didn't specified what database, user and password it must use.

    Polish - musisz uzupełnić nazwę bazy danych, użytkownika i hasło do niego w banlist.php.
     
  4. Offline

    dirkson

    Thank you for this plugin. It really saved our bacon when mcbans got a stick up their *cough* and decided to throw us out for banning spammers.

    -Dirk
     
  5. Offline

    kamild1996

    I did this/zrobiłem już to.
     
  6. Offline

    yottabyte

  7. Offline

    dirkson

    Getting this on 1060:

    17:21:09 [SEVERE] Could not pass event PLAYER_LOGIN to KiwiAdmin
    java.lang.NullPointerException
    at java.util.regex.Matcher.appendReplacement(Unknown Source)
    at java.util.regex.Matcher.replaceAll(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    at com.yottabyte.bukkit.KiwiAdminPlayerListener.onPlayerLogin(KiwiAdminPlayerListener.java:48)
    at org.bukkit.plugin.java.JavaPluginLoader$13.execute(JavaPluginLoader.java:328)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:184)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:82)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  8. Offline

    Cranky Miner

    Can you add a custom text so when they try to log in they get that text?
    That would be sooooo great!
     
  9. Offline

    dog.big

    Hello,
    i have solved my issue by adding these lines into config.yml (these were missing):
    Code:
    mysql-table-ip: banlistip
    messages:
        LoginIPBan: "&cThis IP is banned!"
    
    Suggestion:
    /ipban IP_OF_OFFLINE_PL
    could be usefull :]

    Also i found bug, when IP-banned player want to connect
    Code:
    2011-08-21 17:30:07 [SEVERE] Could not pass event PLAYER_LOGIN to KiwiAdmin
    java.lang.NullPointerException
        at java.util.regex.Matcher.appendReplacement(Matcher.java:699)
        at java.util.regex.Matcher.replaceAll(Matcher.java:813)
        at java.lang.String.replaceAll(String.java:2189)
        at com.yottabyte.bukkit.KiwiAdminPlayerListener.onPlayerLogin(KiwiAdminPlayerListener.java:48)
        at org.bukkit.plugin.java.JavaPluginLoader$13.execute(JavaPluginLoader.java:328)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:184)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:82)
        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:453)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-21 17:30:07 [INFO] dogbig [/81.200.57.134:8192] logged in with entity id 17281 at ([world] 165.5197287
     
  10. Offline

    Opblaaskaas

    When I IP ban someone they always come back within 2 minutes on a different username, stupid cracked clients.
     
  11. Offline

    thestriker095

    /kick * does not work (it says "<name> kicked everyone for Reason: <reason> but no one gets disconnected
     
  12. Offline

    Evilhaunting

    Can you add the command /ip check <playername> which lists all the ips that logged on that player's name
     
  13. Offline

    yottabyte

    I have started working on KiwiAdmin 3.0, it will basically be a whole new plugin. I will probably add some way of converting the database to 3.0.

    I don't plan on updating 2.0 any more. Also, 3.0 isn't really a high priority unfortunately. I have about 5 plugins with higher priority right now.
     
  14. Offline

    lauris3722

    How to unban ip without restarting the server? Can't find /unbanip and /reloadips similar commands.
     
  15. Offline

    NINJ4

  16. Offline

    ParadoXX

    I do not know what I'm doing wrong but I just can not ..
    Please advice.
    I write as / tempban and nothing. Error
    Either it coincides with some plugin or do not know ...
     
  17. Offline

    Jekotia

    I can't say with certainty, but from my experience it seems that with craftbukkit build 1060, I assume in relation to the permissions changes for in-built commands, that a method for plugins to override in-built commands has changed, if not been removed. Some plugins I tried continued to override in-built commands (that hadn't been updated for 1060), and some, like KiwiAdmin, did not.
     
  18. Offline

    Leemur

    my config file looks like
    Code:
    mysql: true
    mysql-database: 'jdbc:mysql://localhost/minecraft'
    mysql-user: 'root'
    mysql-password: 'mypassword'
    mysql-table: banlist
    mysql-table-ip: banlistip
    auto-complete: true
    
    At starting server I got this error:
    Code:
    04:30:45 [SEVERE] [KiwiAdmin] Couldn't execute MySQL statement:
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'minecraft.banl
    ist' doesn't exist
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
            at com.mysql.jdbc.Util.getInstance(Util.java:382)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
    va:2111)
            at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
    2273)
            at com.yottabyte.bukkit.Database.<init>(Database.java:37)
            at com.yottabyte.bukkit.KiwiAdmin.onEnable(KiwiAdmin.java:134)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:885)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:278)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161
    )
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:286)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:273)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:149)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    04:30:45 [INFO] [KiwiAdmin] Initialized db connection
    04:30:45 [INFO] KiwiAdmin version 2.2 is enabled!
    what I should do? Without mysql works fine, but I need in mysql
     
  19. Offline

    Jekotia

    "Table 'minecraft.banlist' doesn't exist"

    You need to ensure there's a table called 'banlist' in the database 'minecraft'
     
    Leemur likes this.
  20. Offline

    Lykkepillen

    Does KiwiAdmin work with 1060?

    Thanks :)
     
  21. Offline

    Leemur

    ok thanks. Other plugins what use SQL has created this table automatically if it doesn't exists
     
  22. Offline

    Thequickthinkin

    Request mutes for version: 2.3 :D
     
  23. Offline

    Mercury

  24. Offline

    dep2011

    Can you make the banlist.txt be a .yml file instead because if the servers hosted of a windows server using the commands to unban a player don't actually take any effect as you can't edit a .txt file while in use?
     
  25. Offline

    Semirotta

    i can do /ban *player* 24 hours (reason) ? it bans player for 24 hours and then itself removes the ban after 24 hours is worn out? :O ir 1 month or 1 year or 2 years ?
     
  26. Offline

    nicholosophy

    @yottabyte is there a chance you could update github with the latest source as of when you stopped developing it? I'd like to take a look and see we could add some ban logging. Cheers.
     
  27. Offline

    yottabyte

    I don't have the source as I've already started working on 3.0. I suggest you decompile the latest version instead.
     
  28. Offline

    Thyrin

    Does this mean you are updating the plugin for future bukkit releases?
     
  29. Offline

    rostex

    what about unban from ip? It doesnt work =(
     
  30. Offline

    rostex

    Please help. I have problem to connect plugin to mysql. I install connector and plugin wrote that mysql was connected but when i bun somebody he can entry to my server again
     
  31. Offline

    crysis992

    I´ll hope you update for 1.8 :/
    This is the best ban/kick plugin out there :)
     

Share This Page