summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterscriptdebug.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-16 10:56:11 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-16 10:56:11 +0100
commitae8985fe7087b337996459897b27704650932fd5 (patch)
tree2c2bbf291242494b0b4f282bda85067f98ced6d6 /indra/newview/llfloaterscriptdebug.cpp
parent42743f8b430e15613ad93d66463a5139aaed84ec (diff)
parent960eb2c65fe5618bf977b80a3485a4346d5d85c6 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llfloaterscriptdebug.cpp')
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp8
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);
}
}