Skip to content
Snippets Groups Projects
Commit 2347cf35 authored by Eugene Mutavchi's avatar Eugene Mutavchi
Browse files

Fixed critical EXT-6793 (/me does not work on Debug Channel) - added handling...

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
parent 1361d950
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,10 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: ...@@ -104,6 +104,10 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
LLViewerObject* objectp = gObjectList.findObject(source_id); LLViewerObject* objectp = gObjectList.findObject(source_id);
std::string floater_label; 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) if (objectp)
{ {
objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI)); objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI));
...@@ -121,14 +125,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: ...@@ -121,14 +125,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
LLFloaterScriptDebugOutput* floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null); LLFloaterScriptDebugOutput* floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null);
if (floaterp) if (floaterp)
{ {
floaterp->addLine(utf8mesg, user_name, color); floaterp->addLine(message, user_name, color);
} }
// add to specific script instance floater // add to specific script instance floater
floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", source_id); floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", source_id);
if (floaterp) if (floaterp)
{ {
floaterp->addLine(utf8mesg, floater_label, color); floaterp->addLine(message, floater_label, color);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment