Refactored /tell idle auto-response; added support for configuring an
away/busy auto-response message. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2797 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: BodyObject.java,v 1.7 2003/06/14 00:55:40 mdb Exp $
|
||||
// $Id: BodyObject.java,v 1.8 2003/09/18 17:53:48 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.data;
|
||||
|
||||
@@ -22,6 +22,9 @@ public class BodyObject extends ClientObject
|
||||
/** The field name of the <code>status</code> field. */
|
||||
public static final String STATUS = "status";
|
||||
|
||||
/** The field name of the <code>awayMessage</code> field. */
|
||||
public static final String AWAY_MESSAGE = "awayMessage";
|
||||
|
||||
/**
|
||||
* The username associated with this body object.
|
||||
*/
|
||||
@@ -44,6 +47,12 @@ public class BodyObject extends ClientObject
|
||||
*/
|
||||
public transient long statusTime;
|
||||
|
||||
/**
|
||||
* If non-null, this contains a message to be auto-replied whenever
|
||||
* another user delivers a tell message to this user.
|
||||
*/
|
||||
public String awayMessage;
|
||||
|
||||
// documentation inherited
|
||||
public void applyToListeners (ListenerOp op)
|
||||
{
|
||||
@@ -102,4 +111,18 @@ public class BodyObject extends ClientObject
|
||||
requestAttributeChange(STATUS, new Byte(status));
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests that the <code>awayMessage</code> field be set to the specified
|
||||
* value. The local value will be updated immediately and an event
|
||||
* will be propagated through the system to notify all listeners that
|
||||
* the attribute did change. Proxied copies of this object (on
|
||||
* clients) will apply the value change when they received the
|
||||
* attribute changed notification.
|
||||
*/
|
||||
public void setAwayMessage (String awayMessage)
|
||||
{
|
||||
requestAttributeChange(AWAY_MESSAGE, awayMessage);
|
||||
this.awayMessage = awayMessage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user