Make it easy to create a UserMessage for tells.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4252 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-07-06 00:27:44 +00:00
parent 05cef39f63
commit a3c86ec1d4
2 changed files with 12 additions and 2 deletions
@@ -50,4 +50,15 @@ public class UserMessage extends ChatMessage
this.speaker = speaker; this.speaker = speaker;
this.mode = mode; this.mode = mode;
} }
/**
* Constructs a user message for a player originated tell (which has no
* bundle and is in the default mode).
*/
public UserMessage (String message, Name speaker)
{
super(message, null);
this.speaker = speaker;
this.mode = ChatCodes.DEFAULT_MODE;
}
} }
@@ -263,8 +263,7 @@ public class ChatProvider
*/ */
protected UserMessage createTellMessage (BodyObject source, String message) protected UserMessage createTellMessage (BodyObject source, String message)
{ {
return new UserMessage( return new UserMessage(message, source.getVisibleName());
message, null, source.getVisibleName(), DEFAULT_MODE);
} }
/** /**