From 6b468393aa26e605832684aaa457358c93be2870 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 4 Aug 2001 03:13:26 +0000 Subject: [PATCH] Finished wiring up tell capabilities. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@183 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- rsrc/config/crowd/server.properties | 5 ++-- .../crowd/chat/client/ChatDirector.java | 25 +++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/rsrc/config/crowd/server.properties b/rsrc/config/crowd/server.properties index 5288dcc3d..8b084d9a0 100644 --- a/rsrc/config/crowd/server.properties +++ b/rsrc/config/crowd/server.properties @@ -1,9 +1,10 @@ # -# $Id: server.properties,v 1.1 2001/07/23 21:15:02 mdb Exp $ +# $Id: server.properties,v 1.2 2001/08/04 03:13:26 mdb Exp $ # # Configuration for the Party server # These invocation service providers will be registered with the # invocation manager during the server init process providers = \ - location = com.threerings.cocktail.party.server.LocationProvider + location = com.threerings.cocktail.party.server.LocationProvider, \ + chat = com.threerings.cocktail.party.chat.ChatProvider diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index 7ceed1a89..9750f03f5 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -1,10 +1,11 @@ // -// $Id: ChatDirector.java,v 1.4 2001/08/04 02:54:28 mdb Exp $ +// $Id: ChatDirector.java,v 1.5 2001/08/04 03:13:26 mdb Exp $ package com.threerings.cocktail.party.chat; import java.util.ArrayList; import com.threerings.cocktail.cher.dobj.*; +import com.threerings.cocktail.cher.util.Codes; import com.threerings.cocktail.party.Log; import com.threerings.cocktail.party.client.LocationObserver; @@ -158,8 +159,11 @@ public class ChatManager */ public void handleTellNotification (String source, String message) { - Log.info("Tell notification [src=" + source + - ", msg=" + message + "]."); + // pass this on to our chat displays + for (int i = 0; i < _displays.size(); i++) { + ChatDisplay display = (ChatDisplay)_displays.get(i); + display.displayTellMessage(source, message); + } } /** @@ -167,9 +171,13 @@ public class ChatManager * * @param invid the invocation id of the tell request. */ - public void handleTellSuccess (int invid) + public void handleTellSucceded (int invid) { - Log.info("Tell succeeded [invid=" + invid + "]."); + // pass this on to our chat displays + for (int i = 0; i < _displays.size(); i++) { + ChatDisplay display = (ChatDisplay)_displays.get(i); + display.handleResponse(invid, Codes.SUCCESS); + } } /** @@ -180,8 +188,11 @@ public class ChatManager */ public void handleTellFailed (int invid, String reason) { - Log.info("Tell failed [invid=" + invid + - ", reason=" + reason + "]."); + // pass this on to our chat displays + for (int i = 0; i < _displays.size(); i++) { + ChatDisplay display = (ChatDisplay)_displays.get(i); + display.handleResponse(invid, reason); + } } protected void handleSpeakMessage (Object[] args)