/**
 * Copyright (C) 2013 Alexander Szczuczko
 *
 * This file may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
package ca.szc.keratin.core.event.message.recieve;

import net.engio.mbassy.bus.MBassador;
import ca.szc.keratin.core.event.IrcEvent;
import ca.szc.keratin.core.event.message.MessageRecieve;
import ca.szc.keratin.core.net.message.IrcMessage;

public class ReceiveJoin
    extends MessageRecieve
{
    public static final String COMMAND = "JOIN";

    public ReceiveJoin( MBassador<IrcEvent> bus, IrcMessage message )
    {
        super( bus, message );
    }

    // public ReceiveJoin( MBassador<IrcEvent> bus, String prefix, String channel )
    // throws InvalidMessagePrefixException, InvalidMessageCommandException, InvalidMessageParamException
    // {
    // super( bus, new IrcMessage( prefix, COMMAND, channel ) );
    // }
}

@@ -216,16 +216,48 @@
 cieve;%0A%0A
+import org.pmw.tinylog.Logger;%0A%0A
 import n
@@ -418,521 +418,2255 @@
 ore.
-net.message.IrcMessage;%0A%0Apublic class ReceiveJoin%0A    extends MessageRecieve%0A%7B%0A    public static final String COMMAND = %22JOIN%22;%0A%0A    public ReceiveJoin( MBassador%3CIrcEvent%3E bus, IrcMessage message )%0A    %7B%0A        super( bus, message );%0A    %7D%0A%0A    // public ReceiveJoin( MBassador%3CIrcEvent%3E bus, String prefix, String channel )%0A    // throws InvalidMessagePrefixException, InvalidMessageCommandException, InvalidMessageParamException%0A    // %7B%0A    // super( bus, new IrcMessage( prefix, COMMAND, channel ) );%0A    //
+event.message.interfaces.DirectlyReplyable;%0Aimport ca.szc.keratin.core.event.message.interfaces.PrivatelyReplyable;%0Aimport ca.szc.keratin.core.event.message.interfaces.Replyable;%0Aimport ca.szc.keratin.core.event.message.send.SendPrivmsg;%0Aimport ca.szc.keratin.core.net.message.InvalidMessageCommandException;%0Aimport ca.szc.keratin.core.net.message.InvalidMessageParamException;%0Aimport ca.szc.keratin.core.net.message.InvalidMessagePrefixException;%0Aimport ca.szc.keratin.core.net.message.IrcMessage;%0A%0Apublic class ReceiveJoin%0A    extends MessageRecieve%0A    implements Replyable, DirectlyReplyable, PrivatelyReplyable%0A%7B%0A    public static final String COMMAND = %22JOIN%22;%0A%0A    private final String channel;%0A%0A    private final String joiner;%0A%0A    public ReceiveJoin( MBassador%3CIrcEvent%3E bus, IrcMessage message )%0A    %7B%0A        super( bus, message );%0A%0A        joiner = message.getPrefix().substring( 0, message.getPrefix().indexOf( '!' ) );%0A        channel = message.getParams()%5B0%5D.substring( 1 );%0A    %7D%0A%0A    // public ReceiveJoin( MBassador%3CIrcEvent%3E bus, String prefix, String channel )%0A    // throws InvalidMessagePrefixException, InvalidMessageCommandException, InvalidMessageParamException%0A    // %7B%0A    // super( bus, new IrcMessage( prefix, COMMAND, channel ) );%0A    // %7D%0A%0A    public String getJoiner()%0A    %7B%0A        return joiner;%0A    %7D%0A%0A    public String getChannel()%0A    %7B%0A        return channel;%0A    %7D%0A%0A    @Override%0A    public void replyPrivately( String reply )%0A    %7B%0A        try%0A        %7B%0A            getBus().publish( new SendPrivmsg( getBus(), joiner, reply ) );%0A        %7D%0A        catch ( InvalidMessagePrefixException %7C InvalidMessageCommandException %7C InvalidMessageParamException e )%0A        %7B%0A            Logger.error( e, %22Error sending reply%22 );%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void replyDirectly( String reply )%0A    %7B%0A        reply( joiner + %22: %22 + reply );%0A    %7D%0A%0A    @Override%0A    public void reply( String reply )%0A    %7B%0A        try%0A        %7B%0A            getBus().publish( new SendPrivmsg( getBus(), channel, reply ) );%0A        %7D%0A        catch ( InvalidMessagePrefixException %7C InvalidMessageCommandException %7C InvalidMessageParamException e )%0A        %7B%0A            Logger.error( e, %22Error sending reply%22 );%0A        %7D%0A   
  %7D%0A%7D

Add helper methods to ReceiveJoin