Added the TellHandler.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4168 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-06-01 17:35:23 +00:00
parent 56216c27e8
commit 86dd34a0f4
8 changed files with 203 additions and 65 deletions
@@ -2,27 +2,21 @@ package com.threerings.crowd.chat.client {
import com.threerings.util.StringUtil;
import com.threerings.crowd.util.CrowdContext;
import com.threerings.crowd.chat.data.ChatCodes;
public class SpeakHandler extends CommandHandler
{
public function SpeakHandler (chatdir :ChatDirector)
{
_chatdir = chatdir;
}
public override function handleCommand (
speakSvc :SpeakService, cmd :String, args :String, history :Array)
:String
ctx :CrowdContext, speakSvc :SpeakService,
cmd :String, args :String, history :Array) :String
{
if (StringUtil.isBlank(args)) {
return "m.usage_speak";
}
history[0] = cmd + " ";
return _chatdir.requestChat(null, args, true);
return ctx.getChatDirector().requestChat(null, args, true);
}
/** Our ChatDirector. */
protected var _chatdir :ChatDirector;
}
}