diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-15 17:06:04 +0300 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-15 17:06:04 +0300 |
commit | 2347cf356e24eddba6dc8fb61dc37a3e1bcb8ac4 (patch) | |
tree | 9d16a8f73f9105fc031c5c4a402342f34266a066 /indra/newview | |
parent | 1361d950561d03b9aa5f968cb38bff4e24fcd27f (diff) |
Fixed critical EXT-6793 (/me does not work on Debug Channel) - added handling of "/me " and "/me'" messages by LLFloaterScriptDebug.
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/237/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterscriptdebug.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index eeea71cc4c..d6732a9d5c 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -104,6 +104,10 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: LLViewerObject* objectp = gObjectList.findObject(source_id); std::string floater_label; + // Handle /me messages. + std::string prefix = utf8mesg.substr(0, 4); + std::string message = (prefix == "/me " || prefix == "/me'") ? user_name + utf8mesg.substr(3) : utf8mesg; + if (objectp) { objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI)); @@ -121,14 +125,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: LLFloaterScriptDebugOutput* floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null); if (floaterp) { - floaterp->addLine(utf8mesg, user_name, color); + floaterp->addLine(message, user_name, color); } // add to specific script instance floater floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", source_id); if (floaterp) { - floaterp->addLine(utf8mesg, floater_label, color); + floaterp->addLine(message, floater_label, color); } } |