[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. How do you unban name+ip in MySQL ? /ipunban ? fail. If you do /unban it only unbans the players name, not the ip. So how do you unban ip+playername with a command ?
     
  3. Offline

    Otisdiver

    I think I am going to get this for my server, our server's "Ownership" has been looking for an in-game ban plugin (right now we have to use the console to ban players).
     
  4. Offline

    Leemur

    this plugin change the permissions to file banlist.txt . I can't edit this file with ftp conection.
     
  5. Offline

    Milaannnn_

    Does this already work for build 953?
     
  6. Offline

    yottabyte

    Yes
     
    Milaannnn_ likes this.
  7. Offline

    Sphex

    So you can fix /tempban?

    SpheX
     
  8. Offline

    yottabyte

    @Sphex What is there to be fixed? It works for me.
     
  9. Offline

    Sphex

    The player was not saved in the database :s
     
  10. Offline

    Sphex

    I'm using MySQL instead of Sqlite
     
  11. Offline

    BLOWUPFISH

    Can you make it so you can unban a Ip in game and when you do /reloadka it also reloads the ipbanlist.txt. And also with the temp ban is it like minutes like /tempban <name> <number of minutes> etc...
     
  12. Offline

    alex4108

    Really nice system here! My only thing is, I programmed an entire web system for my admins, so we can manage bans without being in-game. Now I need to figure these things out

    1) If i /reloadka, will it automatically ban and kick users that match an active ban in our MySQL?
    2) When using mysql, for some reason bans are also logged onto the banlist.txt, so unbanning via MySQL won't work either

    If you could clear this up on me, or add these into the plugin, It'd be awesome!
     
  13. Offline

    Zarius

    I'm looking for this option too, if possible.
     
  14. Offline

    chlitto

    is there a way to easy export flatfile to mysql?
     
  15. Offline

    jor956

    How can I transfer all my flatfile bans to MySQL?

    I don't understand how you format the temp ban command, how would you ban somebody for say.. 3 hours? and how would you ban them at a certain date and time?

    Also, would you be able to make /checkban have the ban reason?

    Anyone? I really need to know how to tempban..

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  16. Offline

    Zarius

    Try /tempban <name> 3 hour <reason>
     
  17. Offline

    kostet_9804

    ipban not working on 953 with mysql

    >ipban Marlos somereason
    01:20:59 [INFO] Couldn't find player.
    >ipban 78.37.47.124 somereason
    01:21:30 [INFO] Couldn't find player.

    Please fix it
     
  18. Offline

    yottabyte

    You have to put the player name. Looks like it can't find the player Marlos.
    edit: The players also has to be online for ip bans to work
     
  19. Offline

    Fr3xXy

    [SEVERE] Could not load 'plugins/KiwiAdmin.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 925

    What can i do? Where is my mistake?

    I inserted the 2 MySQL tables. And then i edited the configfile with my mysql data.

    But i got this error @ start.
     
  20. Offline

    generalmek

    can u make list comand and more?
     
  21. Offline

    Refresh100

    In config.yml file, is there any way to include %reason% into the IP Ban message, if not, this would be a highly anticipated feature for me.
     
  22. Offline

    heifinator

    Love this plugin.

    Curious if you could add something to allow us to log / archive all bans. I would like to be able to see old tempbans that have expired so I could see multiple offenders.

    Thanks!
     
  23. Offline

    yottabyte

    This has been suggested by mods on my own server and I agree, it would be a good feature to have.

    Nonetheless, I am pretty busy working on five other plugins right now so it would probably be a while.
     
    alex4108 likes this.
  24. Offline

    kostet_9804

    If you can - implement plz oportunity to ban offline players by ip.
     
  25. Offline

    yottabyte

    To do that I'd have to store all the IP addresses somewhere. It could be a good feature but then again, I'm pretty busy with other projects atm.
     
  26. Offline

    Black_Jack

    IP unban feature?
     
  27. Offline

    trasmus3

    Hi, thanks for at great plugin

    It would be great if /checkban showed the reason of the ban.
     
  28. Offline

    thestriker095

    any way to unban an ip with commands?

    what is the "kickallmsg" for in the config?

    im assuming its the message players receive when everyone gets kicked but im confused as i see no command for this feature?

    Please help!

    Thanks!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  29. Offline

    yottabyte

    Ah, you can use /kick * <reason> to kick everyone on the server, including yourself. Could be useful for server restarts and such.
     
  30. Offline

    cheepz

    Can you check your tempban features to be working correctly?
    I did /tempban <playername> 12 hour <reason>
    and had to unban him days after finding out he wasn't unbanned yet.

    Also, can you add a timer to your tempban login message?
    Instead of a time and a time zone, put , for example.

    Month: 0 Week: 0 Day: 0 Hour: 12 Min: 53 Sec: 30
    Reason: <insert here>
     
  31. Offline

    yottabyte

    @cheepz

    Players will be unbanned the next time they log in if the time is out.
    The log in / kick message can only be one line.
     

Share This Page