Added facilities for sending system messages to places which are like
speak messages but come from the server and are displayed differently (like in all red or something because these will say things like "The system is shutting down in five minutes.") git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@501 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatProvider.java,v 1.6 2001/10/18 20:51:59 mdb Exp $
|
||||
// $Id: ChatProvider.java,v 1.7 2001/10/18 23:55:24 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -55,4 +55,21 @@ public class ChatProvider
|
||||
placeOid, ChatService.SPEAK_NOTIFICATION, outargs);
|
||||
CrowdServer.omgr.postEvent(nevt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a system message notification to the specified place object
|
||||
* with the supplied message content. A system message is one that
|
||||
* will be rendered where the chat messages are rendered, but in a way
|
||||
* that makes it clear that it is a message from the server.
|
||||
*
|
||||
* @param placeOid the place to which to deliver the message.
|
||||
* @param message the text of the message.
|
||||
*/
|
||||
public static void sendSystemMessage (int placeOid, String message)
|
||||
{
|
||||
Object[] outargs = new Object[] { message };
|
||||
MessageEvent nevt = new MessageEvent(
|
||||
placeOid, ChatService.SYSTEM_NOTIFICATION, outargs);
|
||||
CrowdServer.omgr.postEvent(nevt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user