From 6f336305f87f7007c2df0e11e23bad992e8e9fdf Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 24 Nov 2003 17:52:15 +0000 Subject: [PATCH] Obtain the idle time from our client config. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2866 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/crowd/chat/client/ChatDirector.java | 5 ++++- src/java/com/threerings/crowd/chat/data/ChatCodes.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index 69d324618..91d4a4943 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -1,5 +1,5 @@ // -// $Id: ChatDirector.java,v 1.53 2003/09/23 23:03:34 mdb Exp $ +// $Id: ChatDirector.java,v 1.54 2003/11/24 17:52:15 mdb Exp $ package com.threerings.crowd.chat.client; @@ -381,6 +381,9 @@ public class ChatDirector extends BasicDirector // if they are idle, report that if (idletime > 0L) { + // adjust by the time it took them to become idle + idletime += _ctx.getConfig().getValue( + "narya.chat.idle_time", DEFAULT_IDLE_TIME); String msg = MessageBundle.compose( "m.recipient_idle", MessageBundle.taint(target), TimeUtil.getTimeOrderString(idletime, TimeUtil.MINUTE)); diff --git a/src/java/com/threerings/crowd/chat/data/ChatCodes.java b/src/java/com/threerings/crowd/chat/data/ChatCodes.java index e08b04ccd..53ac046de 100644 --- a/src/java/com/threerings/crowd/chat/data/ChatCodes.java +++ b/src/java/com/threerings/crowd/chat/data/ChatCodes.java @@ -1,5 +1,5 @@ // -// $Id: ChatCodes.java,v 1.16 2003/06/03 21:41:33 ray Exp $ +// $Id: ChatCodes.java,v 1.17 2003/11/24 17:52:15 mdb Exp $ package com.threerings.crowd.chat.data; @@ -13,6 +13,9 @@ public interface ChatCodes extends InvocationCodes /** The message identifier for a chat notification message. */ public static final String CHAT_NOTIFICATION = "chat"; + /** The default time after which a player is assumed idle. */ + public static final long DEFAULT_IDLE_TIME = 3 * 60 * 1000L; + /** The chat localtype code for chat messages delivered on the place * object currently occupied by the client. This is the only type of * chat message that will be delivered unless the chat director is