com.planet_ink.coffee_mud.core.intermud.packets
Class TellPacket

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.intermud.packets.Packet
      extended by com.planet_ink.coffee_mud.core.intermud.packets.TellPacket

public class TellPacket
extends Packet

This extension of the Packet class handles incoming and outgoing intermud tells. To use it in a services object, simply grab the data out of its public members. To use it to send a tell, set all of its public data members and call the send() method.
Created: 22 Spetember 1996
Last modified: 29 September 1996


Field Summary
 java.lang.String message
          The actual message being sent.
 java.lang.String sender_visible_name
          The display name for the person sending the tell.
 
Fields inherited from class com.planet_ink.coffee_mud.core.intermud.packets.Packet
CHAN_ADD, CHAN_EMOTE, CHAN_LISTEN, CHAN_MESSAGE, CHAN_REMOVE, CHAN_TARGET, CHAN_WHO_REP, CHAN_WHO_REQ, LOCATE_QUERY, LOCATE_REPLY, sender_mud, sender_name, target_mud, target_name, TELL, type, WHO_REPLY, WHO_REQUEST
 
Constructor Summary
TellPacket()
           
TellPacket(Interactive u, java.lang.String who, java.lang.String mud, java.lang.String msg)
          Constructs an outgoing tell.
TellPacket(java.util.Vector v)
          Constructs a tell package based on an I3 mud mode vector.
 
Method Summary
 void send()
          Sends a properly constructed outgoing tell to its target.
 java.lang.String toString()
          This method is used by the I3 system to turn the packet into a mud mode string.
 
Methods inherited from class com.planet_ink.coffee_mud.core.intermud.packets.Packet
convertString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sender_visible_name

public java.lang.String sender_visible_name
The display name for the person sending the tell.


message

public java.lang.String message
The actual message being sent.

Constructor Detail

TellPacket

public TellPacket()

TellPacket

public TellPacket(java.util.Vector v)
           throws InvalidPacketException
Constructs a tell package based on an I3 mud mode vector.

Parameters:
v - the I3 mud mode vector containing the incoming tell
Throws:
InvalidPacketException - thrown if the incoming packet is bad

TellPacket

public TellPacket(Interactive u,
                  java.lang.String who,
                  java.lang.String mud,
                  java.lang.String msg)
Constructs an outgoing tell.

Parameters:
u - the interactive sending the tell
who - the person whom they are sending the tell to
mud - the mud the target is on
msg - the message being sent
Method Detail

send

public void send()
          throws InvalidPacketException
Sends a properly constructed outgoing tell to its target.

Overrides:
send in class Packet
Throws:
InvalidPacketException - thrown if this packet was not properly constructed
See Also:
Packet.send()

toString

public java.lang.String toString()
This method is used by the I3 system to turn the packet into a mud mode string. To see the proper format for an I3 tell, see the Intermud 3 documentation.

Overrides:
toString in class java.lang.Object
Returns:
the mud mode string for this packet