@@ -0,0 +1,2355 @@
+package com.brewtab.irc;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport com.brewtab.irc.messages.IRCMessage;%0Aimport com.brewtab.irc.messages.IRCMessageType;%0Aimport com.brewtab.irc.messages.filter.IRCMessageFilter;%0Aimport com.brewtab.irc.messages.filter.IRCMessageSimpleFilter;%0Aimport com.brewtab.irc.messages.filter.IRCUserPrefixFilter;%0A%0A/**%0A * Have a private conversation%0A * %0A * @author Christopher Thunes %3Ccthunes@brewtab.com%3E%0A */%0Apublic class IRCPrivateChat implements IRCMessageHandler %7B%0A    private final static Logger log = LoggerFactory.getLogger(IRCPrivateChat.class);%0A%0A    /* Nick of the user receiving the messages */%0A    private String receiver;%0A%0A    /* Associated IRCClient object */%0A    private IRCClient client;%0A%0A    public IRCPrivateChat(IRCClient client, String nick) %7B%0A        this.client = client;%0A        this.receiver = nick;%0A%0A        IRCMessageFilter filter = new IRCMessageSimpleFilter(IRCMessageType.PRIVMSG, new IRCUserPrefixFilter(nick));%0A        this.client.addHandler(filter, this);%0A    %7D%0A%0A    public String getReceiver() %7B%0A        return this.receiver;%0A    %7D%0A%0A    /**%0A     * Get the associated IRCClient%0A     * %0A     * @return the associated IRCClient%0A     */%0A    public IRCClient getClient() %7B%0A        return this.client;%0A    %7D%0A%0A    /**%0A     * Write a message to the channel%0A     * %0A     * @param text%0A     *            The message to send%0A     */%0A    public void write(String text) %7B%0A        IRCMessage privMessage = new IRCMessage(IRCMessageType.PRIVMSG, this.receiver, text);%0A        this.client.getConnection().sendMessage(privMessage);%0A    %7D%0A%0A    /**%0A     * Write multiple messages efficiently%0A     * %0A     * @param strings%0A     *            The messages to send%0A     */%0A    public void writeMultiple(String... strings) %7B%0A        IRCMessage%5B%5D privMessages = new IRCMessage%5Bstrings.length%5D;%0A        for (int i = 0; i %3C strings.length; i++) %7B%0A            privMessages%5Bi%5D = new IRCMessage(IRCMessageType.PRIVMSG, this.receiver, strings%5Bi%5D);%0A        %7D%0A        this.client.getConnection().sendMessages(privMessages);%0A    %7D%0A%0A    @Override%0A    public void handleMessage(IRCMessage message) %7B%0A        IRCUser user = IRCUser.fromString(message.getPrefix());%0A        String messageText = message.getArgs()%5Bmessage.getArgs().length - 1%5D;%0A%0A        log.debug(%22PM from %7B%7D: %7B%7D%22, user.getNick(), messageText);%0A    %7D%0A%7D%0A

Add support for sending private messages