/*
Copyright (C) 2005 David Green <green@couchpotato.net>

This file is part of I3J.

I3J is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

I3J is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with I3J; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

package com.aelfengard.i3.packet;

import java.util.List;

import com.aelfengard.i3.LPCUtils;
import com.aelfengard.i3.LPCMixed;

public class ChannelTPacket extends I3Packet {

    public static final String TOKEN = "channel-t";
    
    private LPCMixed originatorMudName = new LPCMixed("");
    private LPCMixed originatorUsername = new LPCMixed("");
    private LPCMixed channelName = new LPCMixed("");
    private LPCMixed targettedMudName = new LPCMixed("");
    private LPCMixed targettedUsername = new LPCMixed("");
    private LPCMixed messageOthers = new LPCMixed("");
    private LPCMixed messageTarget = new LPCMixed("");
    private LPCMixed originatorVisName = new LPCMixed("");
    private LPCMixed targetVisName = new LPCMixed("");
    
    public ChannelTPacket() {
        super(I3Packet.Type.CHANNEL_T);
    }
    
    public ChannelTPacket(List<LPCMixed> args) {
        this();
        originatorMudName = args.get(2);
        originatorUsername = args.get(3);
        channelName = args.get(6);
        targettedMudName = args.get(7);
        targettedUsername = args.get(8);
        messageOthers = args.get(9);
        messageTarget = args.get(10);
        originatorVisName = args.get(11);
        targetVisName = args.get(12);
    }
    
    public List<LPCMixed> toList() {
        return LPCUtils.makeList(
                TOKEN,
                5, // spec says must be 5
                originatorMudName,
                originatorUsername,
                0, // spec says must be 0
                0, // spec says must be 0
                channelName,
                targettedMudName,
                targettedUsername,
                messageOthers,
                messageTarget,
                originatorVisName,
                targetVisName
        );
    }

    public LPCMixed getChannelName() {
        return channelName;
    }
    

    public void setChannelName(LPCMixed channelName) {
        this.channelName = channelName;
    }
    

    public LPCMixed getMessageOthers() {
        return messageOthers;
    }
    

    public void setMessageOthers(LPCMixed messageOthers) {
        this.messageOthers = messageOthers;
    }
    

    public LPCMixed getMessageTarget() {
        return messageTarget;
    }
    

    public void setMessageTarget(LPCMixed messageTarget) {
        this.messageTarget = messageTarget;
    }
    

    public LPCMixed getOriginatorMudName() {
        return originatorMudName;
    }
    

    public void setOriginatorMudName(LPCMixed originatorMudName) {
        this.originatorMudName = originatorMudName;
    }
    

    public LPCMixed getOriginatorUsername() {
        return originatorUsername;
    }
    

    public void setOriginatorUsername(LPCMixed originatorUsername) {
        this.originatorUsername = originatorUsername;
    }
    

    public LPCMixed getOriginatorVisName() {
        return originatorVisName;
    }
    

    public void setOriginatorVisName(LPCMixed originatorVisName) {
        this.originatorVisName = originatorVisName;
    }
    

    public LPCMixed getTargettedMudName() {
        return targettedMudName;
    }
    

    public void setTargettedMudName(LPCMixed targettedMudName) {
        this.targettedMudName = targettedMudName;
    }
    

    public LPCMixed getTargettedUsername() {
        return targettedUsername;
    }
    

    public void setTargettedUsername(LPCMixed targettedUsername) {
        this.targettedUsername = targettedUsername;
    }
    

    public LPCMixed getTargetVisName() {
        return targetVisName;
    }
    

    public void setTargetVisName(LPCMixed targetVisName) {
        this.targetVisName = targetVisName;
    }
    

}