WMCAlliance/BukkitIRCd — pull request #26 by ron975 (2013-04-17 22:52:14+00:00)
Title: Fix IRC->Ingame Kicks, and make ingame kicks fire rawsend KICK instead of a QUIT

Fixes Issue https://github.com/WMCAlliance/BukkitIRCd/issues/6

Tested both on standalone and InspIRCd link

Firstly, this makes all kicks from IRC (eg. `/kick ron975-mc #minecraft`) work again by making them synchronous (`kickPlayer()` is not thread safe).

Secondly, this fixes https://github.com/WMCAlliance/BukkitIRCd/issues/6.
Instead of listening to `PlayerKickEvent`, it listens to Command Events such as `PlayerCommandPreprocessEvent` and `ServerCommandEvent`.

Adding a configuration option, it listens for kick commands listed in config.yml. When it does, it checks for `bukkitircd.kick` (meaning that the kicker must have that permission when kicking someone if you wish for them to kick the linked IRC User as well. If a player is kicked without kicking their IRC User, it may cause exceptions). If the player does so, it fires a `KICK` IRC command, displaying something like `ron975-mc has kicked ron975-mc from #mystia (ron975-mc)` instead of the previous QUIT message.

Due to limitations in how the plugin handles nicknames, it won't work if the IRC nick doesn't match with the ingame name, it won't work. This might have happened before with the older code as well, I just haven't tested it. See issue https://github.com/WMCAlliance/BukkitIRCd/issues/25