[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

    Jekotia

    Build 440, this randomly started to occur with no changes to the server
    2011-03-01 09:19:46 [INFO] KiwiAdmin version 1.0 is enabled!
    2011-03-01 09:19:46 [SEVERE] Unable to retreive connection
    java.sql.SQLException: No suitable driver found for jdbc:mysql://removed/removed?autoReconnect=true&user=removed&removed
    at java.sql.DriverManager.getConnection(DriverManager.java:640)
    at java.sql.DriverManager.getConnection(DriverManager.java:222)
    at com.yottabyte.bukkit.SQLConnection.getSQLConnection(SQLConnection.java:13)
    at com.yottabyte.bukkit.KiwiAdmin.onEnable(KiwiAdmin.java:92)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:79)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:60)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-01 09:19:46 [SEVERE] [KiwiAdmin] Could not establish SQL connection. Disabling KiwiAdmin




    It works now, with absolutely NO changes on the server.
     
  3. Offline

    yottabyte

    I see! Seems like the MySQL GUI added that as default without me noticing it [​IMG]

    @Jekotia Very strange... Looks like it couldn't find the Connector/J... I can't recreate this though.
     
  4. Offline

    Fluff

    Thank you so much for keeping this plugin updated. Temp bans and IP bans would be nice features to have, but I can live without them.
     
  5. Offline

    yottabyte

    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
    Woop, woop.
     
  6. Offline

    Odjit

    Well hurrah, the new changes work fine, but just fyi, I have the same problem as Jekotia. Which is, and especially in that, its extremely odd.
    KiwiAdmin had no problem connecting to the test database (hosted at the same computer as the main one), but when switched to the main one (the only difference is mctest -> minecraft ) it suddenly can't find it and spats out the above error.


    Though also, autocomplete would make me believe perfection does indeed exist. (IE: typing /ban dante will ban the player Dantez2 who is online)
     
  7. Offline

    Rocik

    "Reverted back to normal commands, /ban, /kick and /unban"
    Thanks you so much!!!
     
  8. Offline

    yottabyte

    I have no idea what is causing that. [​IMG]

    Anyway, updated with partial name support (yayz)
     
  9. Offline

    Jekotia

    I actually found the blank lines to be nice; on occassion staff members may forget to report a ban, and that blank line was a nice indicator of bans since I last opened the banlist.txt, making it far easier to tell which bans weren't reported properly on the staff forums.

    And 1.2 makes me want to do unspeakable things with the plugin <3
     
  10. Offline

    bartundlisa

    the download-link is not working
    help!!!!
     
  11. Offline

    yottabyte

    Both are working for me. The first link may have been down for a while when I was restarting that server but there's always the mirror!
     
  12. Offline

    Phanku


    Your server probably updated.

    Update your connect j jar file. I was getting this error every time.
    Updating my connect j jar file to the newest version fixed it.
     
  13. Offline

    Odjit

    Updating my connect j jar file did nothing. On my home test server, it connects fine, on the linux machine, no luck =/ BB connects fine with the connect j on both .-.
     
  14. Offline

    Derzull

    I got exactly the same problem, i tried to update too, nothing changed.

    EDIT: There is only
    "Manifest-Version: 1.0
    Sealed: true"

    in your META-INF/MANIFEST.MF while in other MySQL plugins there is also a line like this :

    "Class-Path: ../lib/mysql.jar ../lib/mysql-connector-java-bin.jar ../lib/mysql-connector-java-5.1.14-bin.jar ../lib/mysql-connector-java-5.1.15-bin.jar ../lib/sqlite.jar ../lib/sqlite-jdbc.jar ../lib/sqlite-v056.jar ../lib/sqlitejdbc-v056.jar ../mysql.jar ../mysql-connector-java-bin.jar ../mysql-connector-java-5.1.14-bin.jar ../mysql-connector-java-5.1.15-bin.jar ../sqlite.jar ../sqlite-jdbc.jar ../sqlite-v056.jar ../sqlitejdbc-v056.jar3"

    I hope it can help to fix this cool plugin.
     
  15. Offline

    Kubko

    error when i try to kick:
    Code:
    2011-03-05 19:33:48 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'kick
    ' in plugin KiwiAdmin v1.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    76)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:638)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:601)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:595)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: mapping values are not allowed here
     in "<reader>", line 58, column 19:
                    suffix:
                          ^
    
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:74
    5)
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:307)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18
    3)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
    serImpl.java:564)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :228)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    2)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:73)
            at com.nijiko.permissions.Control.load(Control.java:143)
            at com.nijiko.permissions.Control.loadWorld(Control.java:109)
            at com.nijiko.permissions.Control.permission(Control.java:290)
            at com.yottabyte.bukkit.KiwiAdmin.kickPlayer(KiwiAdmin.java:320)
            at com.yottabyte.bukkit.KiwiAdmin.onCommand(KiwiAdmin.java:209)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
            ... 12 more
    2011-03-05 19:33:50 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'kick
    ' in plugin KiwiAdmin v1.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    76)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:638)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:601)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:595)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: mapping values are not allowed here
     in "<reader>", line 58, column 19:
                    suffix:
                          ^
    
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:74
    5)
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:307)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18
    3)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
    serImpl.java:564)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :228)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    2)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:73)
            at com.nijiko.permissions.Control.load(Control.java:143)
            at com.nijiko.permissions.Control.loadWorld(Control.java:109)
            at com.nijiko.permissions.Control.permission(Control.java:290)
            at com.yottabyte.bukkit.KiwiAdmin.kickPlayer(KiwiAdmin.java:320)
            at com.yottabyte.bukkit.KiwiAdmin.onCommand(KiwiAdmin.java:209)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
            ... 12 more
    
     
  16. Offline

    Odjit

    Even though it still says it doesn't connect and it 'disables' the plugin is still 'working' and putting names on the mysql. But I don't think it reads from it after a reload or w.e cause some banned people are able to return.
     
  17. Offline

    Oscarius

    Any chance of having the ability to ban a player for a certain amount of time?
     
  18. Offline

    Pieman

    Great plugin, but it doesn't seem like the ban reason shows up when I ban people like it should. I definitely entered one. I also see "/kick player [reason] - kick a player when someone is kicked" when I kick people. I am assuming this is an error as well.

    Other than that, this is a really nice plugin - simple and works really well.
     
  19. Offline

    PatrickFreed

    Is there an advantage to using MySql over flatfile?
     
  20. Offline

    Kainzo

    Just a quick question - does this work against 493?
    --- merged: Mar 7, 2011 4:25 PM ---
    99.9% of plugins do not need mysql.
     
  21. Offline

    tekac

    @Kainzo I just put it up on my server to test it. Seems to be working. Instead of /ka kick/ban I jsut use /kick and /ban. Players get removed from server and remained banned if banned. I use build #514
     
  22. Offline

    yottabyte

    Yes, this does work with 493+.
    I'm really busy atm. though so I can't look over any bugs guys, that'll have to wait! [​IMG]
    Kubko, looks more like a problem with Permissions to me.
     
  23. Offline

    Kubko

    yeah got it to work.. any chance you could update flatfile ban list so it would show ban reasons too?
     
  24. Offline

    Matthew Uecker

    Currently using this plugin for making Moderators. Very nice, I like that I get to keep them from having op status but still give them a little bit of pull you know?

    Keep up the good work.
     
  25. Offline

    Kainzo

    Now supporting kiwiadmin!
     
  26. Offline

    PatrickFreed

    for me, it just says banned successfully, but there is no global message
     
  27. Offline

    Kresnik002

    No banip?
     
  28. Offline

    yottabyte

    @Kubko I will look into that when I have more free time. Currently pretty busy with other projects.

    @PatrickFreed It only sends a global message if the victim is online.

    @Kresnik002 Not yet, no.

    @Kainzo Awesome! [​IMG]
     
  29. Offline

    Tfs Halo

    i suggest a kick all command and ban all because if they have weird names or if they have no names at all like what i encountered yesterday. if he keeps on coming back after u kick him you ban all then /unban the players that you want to keep .
     
  30. Offline

    Racha

    Is there anyway to ban ip?
     
  31. Offline

    RustyDagger

    is this being updated I need exactly this Because command book dont have kick/ban for some stupid reason (being a general commands plugin you would think it would have it but nope so this would fit so perfect but theres no point me installing it if its not going to be around the main thats the main reason i use command book cause i know its going to be stable and stick around.
     

Share This Page