From f08f8158f03c28886e2bf3ddab964600761a53cf Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 8 Feb 2011 01:55:23 +0000 Subject: [PATCH] Pass the mode into mogrifyChat. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6483 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/crowd/chat/client/ChatDirector.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java index cda5fe45a..c501a19dd 100644 --- a/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -628,7 +628,7 @@ public class ChatDirector extends BasicDirector */ public String mogrifyChat (String text) { - return mogrifyChat(text, false, true); + return mogrifyChat(text, (byte)-1, false, true); } // documentation inherited @@ -819,7 +819,7 @@ public class ChatDirector extends BasicDirector protected String deliverChat (SpeakService speakSvc, String message, byte mode) { // run the message through our mogrification process - message = mogrifyChat(message, true, mode != ChatCodes.EMOTE_MODE); + message = mogrifyChat(message, mode, true, mode != ChatCodes.EMOTE_MODE); // mogrification may result in something being turned into a slash command, in which case // we have to run everything through again from the start @@ -860,12 +860,14 @@ public class ChatDirector extends BasicDirector /** * Mogrifies common literary crutches into more appealing chat or commands. * + * @param mode the chat mode, or -1 if unknown. * @param transformsAllowed if true, the chat may transformed into a different mode. (lol -> * /emote laughs) * @param capFirst if true, the first letter of the text is capitalized. This is not desired if * the chat is already an emote. */ - protected String mogrifyChat (String text, boolean transformsAllowed, boolean capFirst) + protected String mogrifyChat ( + String text, byte mode, boolean transformsAllowed, boolean capFirst) { int tlen = text.length(); if (tlen == 0) {