public void ban(final String nick, final String channel) {
        if (this.isConnected()) {
            try {
                IRCClient client;
                if ((client = IRC.getChannel(channel).getUser(nick)) != null) {
                    if (client.getHostmask() != null) {
                        if (!client.getHostmask().equalsIgnoreCase("")) {
                            this.kick(nick, channel, "Bye.");
                            this.write("MODE " + channel + " +b "
                                    + client.getHostmask());
                            return;
                        }
                    }
                }
                this.kick(nick, channel, "Bye.");
                this.write("MODE " + channel + " +b " + nick);
            } catch (final IOException e) {
                IRC.debug(e);
            }
        }
    }