byte'd chat mode code
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1600 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatDirector.java,v 1.26 2002/07/22 22:26:26 ray Exp $
|
||||
// $Id: ChatDirector.java,v 1.27 2002/07/22 22:54:03 ray Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -351,18 +351,19 @@ public class ChatDirector
|
||||
}
|
||||
|
||||
String bundle = null;
|
||||
String message, mode;
|
||||
String message;
|
||||
byte mode;
|
||||
|
||||
// determine whether this speak message originated from another
|
||||
// client or from a server entity
|
||||
if (args.length == 3) {
|
||||
message = (String)args[1];
|
||||
mode = (String) args[2];
|
||||
mode = ((Byte) args[2]).byteValue();
|
||||
|
||||
} else {
|
||||
bundle = (String)args[1];
|
||||
message = (String)args[2];
|
||||
mode = (String) args[3];
|
||||
mode = ((Byte) args[3]).byteValue();
|
||||
}
|
||||
|
||||
// pass this on to our chat displays
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatDisplay.java,v 1.11 2002/07/22 22:26:26 ray Exp $
|
||||
// $Id: ChatDisplay.java,v 1.12 2002/07/22 22:54:03 ray Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface ChatDisplay
|
||||
*/
|
||||
public void displaySpeakMessage (
|
||||
String type, String speaker, String bundle, String message,
|
||||
String mode);
|
||||
byte mode);
|
||||
|
||||
/**
|
||||
* Called to display a tell message. A tell message is one that is
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatCodes.java,v 1.8 2002/07/22 22:26:26 ray Exp $
|
||||
// $Id: ChatCodes.java,v 1.9 2002/07/22 22:54:03 ray Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -46,15 +46,15 @@ public interface ChatCodes extends InvocationCodes
|
||||
public static final String TELL_NOTIFICATION = "Tell";
|
||||
|
||||
/** The default mode used by speak requests. */
|
||||
public static final String DEFAULT_MODE = "default";
|
||||
public static final byte DEFAULT_MODE = 0;
|
||||
|
||||
/** The think mode to indicate that the user is thinking
|
||||
* what they're saying, or is it that they're saying what they're
|
||||
* thinking? */
|
||||
public static final String THINK_MODE = "think";
|
||||
public static final byte THINK_MODE = 1;
|
||||
|
||||
/** The mode to indicate that a speak is actually an emote. */
|
||||
public static final String EMOTE_MODE = "emote";
|
||||
public static final byte EMOTE_MODE = 2;
|
||||
|
||||
/** An error code delivered when the user targeted for a tell
|
||||
* notification is not online. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatProvider.java,v 1.11 2002/07/22 22:26:26 ray Exp $
|
||||
// $Id: ChatProvider.java,v 1.12 2002/07/22 22:54:03 ray Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -106,13 +106,13 @@ public class ChatProvider
|
||||
*/
|
||||
public static void sendChatMessage (
|
||||
int placeOid, String speaker, String bundle, String message,
|
||||
String mode)
|
||||
byte mode)
|
||||
{
|
||||
Object[] outargs = null;
|
||||
if (bundle == null) {
|
||||
outargs = new Object[] { speaker, message, mode };
|
||||
outargs = new Object[] { speaker, message, new Byte(mode) };
|
||||
} else {
|
||||
outargs = new Object[] { speaker, bundle, message, mode };
|
||||
outargs = new Object[] { speaker, bundle, message, new Byte(mode) };
|
||||
}
|
||||
MessageEvent nevt = new MessageEvent(
|
||||
placeOid, ChatService.SPEAK_NOTIFICATION, outargs);
|
||||
|
||||
Reference in New Issue
Block a user