com.threerings.crowd.chat.client
Class ChatDirector.TellHandler

java.lang.Object
  extended by com.threerings.crowd.chat.client.ChatDirector.CommandHandler
      extended by com.threerings.crowd.chat.client.ChatDirector.TellHandler
Enclosing class:
ChatDirector

protected class ChatDirector.TellHandler
extends ChatDirector.CommandHandler

Implements /tell.


Field Summary
 
Fields inherited from class com.threerings.crowd.chat.client.ChatDirector.CommandHandler
_aliases, _usageKey
 
Constructor Summary
protected ChatDirector.TellHandler()
           
 
Method Summary
protected  String escapeMessage(String msg)
          Escape or otherwise do any final processing on the message prior to sending it.
 String handleCommand(SpeakService speakSvc, String command, String args, String[] history)
          Handles the specified chat command.
protected  Name normalizeAsName(String handle)
          Turn the user-entered string into a Name object, doing any particular normalization we want to do along the way so that "/tell Bob" and "/tell BoB" don't both show up in history.
protected  String[] parseTell(String args)
          Parse the tell into two strings, handle and message.
 
Methods inherited from class com.threerings.crowd.chat.client.ChatDirector.CommandHandler
checkAccess, getUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatDirector.TellHandler

protected ChatDirector.TellHandler()
Method Detail

handleCommand

public String handleCommand(SpeakService speakSvc,
                            String command,
                            String args,
                            String[] history)
Description copied from class: ChatDirector.CommandHandler
Handles the specified chat command.

Specified by:
handleCommand in class ChatDirector.CommandHandler
Parameters:
speakSvc - an optional SpeakService object representing the object to send the chat message on.
command - the slash command that was used to invoke this handler (e.g. /tell).
args - the arguments provided along with the command (e.g. Bob hello) or null if no arguments were supplied.
history - an in/out parameter that allows the command to modify the text that will be appended to the chat history. If this is set to null, nothing will be appended.
Returns:
an untranslated string that will be reported to the chat box to convey an error response to the user, or ChatCodes.SUCCESS.

parseTell

protected String[] parseTell(String args)
Parse the tell into two strings, handle and message. If either one is null then the parsing did not succeed.


normalizeAsName

protected Name normalizeAsName(String handle)
Turn the user-entered string into a Name object, doing any particular normalization we want to do along the way so that "/tell Bob" and "/tell BoB" don't both show up in history.


escapeMessage

protected String escapeMessage(String msg)
Escape or otherwise do any final processing on the message prior to sending it.