diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp index 83c5b4fc1..15075aa87 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -27,7 +27,7 @@ // // LLFastTimer documentation, written by Aleric (Feb 2012). // -// Disclaimer: this is horrible code and I distantiate myself from it's design. +// Disclaimer: this is horrible code and I distantiate myself from its design. // It's neither robust nor object oriented. I just document what I find, in // order to be able to fix the bugs (that logically result from such a design). // @@ -63,12 +63,12 @@ // LLFastTimer::getFrameStateList()[named_timer.getFrameStateIndex()], where // getFrameStateList() is a static function returning a global std::vector. // This vector is ordered "Depth First" (the FrameState objects (belonging to -// NamedTimer objects) with smallest depth first). The vector is resorted a few +// NamedTimer objects) with smallest depth first). The vector is re-sorted a few // times in the beginning (and indexes in FrameState updated) since timers are added // whenever they are first used, not in "Depth First" order, but stabilizes after a // while. This implies that FrameState pointers can't really be used: FrameState // objects move around in memory whenever something is inserted or removed from the -// std::vector and/or when the vector is resorted. However, FrameState pointers ARE +// std::vector and/or when the vector is re-sorted. However, FrameState pointers ARE // being used and code exists that tries to update those pointers in the above // mentioned cases (this part had bugs, which I now fixed). // diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 0c834da53..56375829a 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -2156,59 +2156,58 @@ void LLFloaterIMPanel::sendMsg() if (mInputEditor) mInputEditor->updateHistory(); // Truncate and convert to UTF8 for transport std::string utf8text = wstring_to_utf8str(text); + // Convert MU*s style poses into IRC emotes here. + if (gSavedSettings.getBOOL("AscentAllowMUpose") && utf8text.length() > 3 && utf8text[0] == ':') + { + if (utf8text[1] == '\'') + { + utf8text.replace(0, 1, "/me"); + } + else if (isalpha(utf8text[1])) // Do not prevent smileys and such. + { + utf8text.replace(0, 1, "/me "); + } + } + if (utf8text.find("/ME'") == 0 || utf8text.find("/ME ") == 0) //Allow CAPSlock /me + utf8text.replace(1, 2, "me"); + std::string prefix = utf8text.substr(0, 4); if (gSavedSettings.getBOOL("AscentAutoCloseOOC") && (utf8text.length() > 1) && !mRPMode) { // Chalice - OOC autoclosing patch based on code by Henri Beauchamp int needsClosingType=0; //Check if it needs the end-of-chat brackets -HgB - if (utf8text.find("((") == 0 && utf8text.find("))") == -1) + if (utf8text.find("((") == 0 && utf8text.find("))") == std::string::npos) { - if(utf8text.at(utf8text.length() - 1) == ')') + if(*utf8text.rbegin() == ')') utf8text+=" "; utf8text+="))"; } - else if(utf8text.find("[[") == 0 && utf8text.find("]]") == -1) + else if(utf8text.find("[[") == 0 && utf8text.find("]]") == std::string::npos) { - if(utf8text.at(utf8text.length() - 1) == ']') + if(*utf8text.rbegin() == ']') utf8text+=" "; utf8text+="]]"; } //Check if it needs the start-of-chat brackets -HgB needsClosingType=0; - if (utf8text.find("((") == -1 && utf8text.find("))") == (utf8text.length() - 2)) + if (prefix != "/me " && prefix != "/me'") //Allow /me to end with )) or ]] { - if(utf8text.at(0) == '(') - utf8text.insert(0," "); - utf8text.insert(0,"(("); - } - else if (utf8text.find("[[") == -1 && utf8text.find("]]") == (utf8text.length() - 2)) - { - if(utf8text.at(0) == '[') - utf8text.insert(0," "); - utf8text.insert(0,"[["); + if (utf8text.find("((") == std::string::npos && utf8text.find("))") == (utf8text.length() - 2)) + { + if(utf8text[0] == '(') + utf8text.insert(0," "); + utf8text.insert(0,"(("); + } + else if (utf8text.find("[[") == std::string::npos && utf8text.find("]]") == (utf8text.length() - 2)) + { + if(utf8text[0] == '[') + utf8text.insert(0," "); + utf8text.insert(0,"[["); + } } } - // Convert MU*s style poses into IRC emotes here. - if (gSavedSettings.getBOOL("AscentAllowMUpose") && utf8text.find(":") == 0 && utf8text.length() > 3) - { - if (utf8text.find(":'") == 0) - { - utf8text.replace(0, 1, "/me"); - } - else if (isalpha(utf8text.at(1))) // Do not prevent smileys and such. - { - utf8text.replace(0, 1, "/me "); - } - } - - if (utf8text.find("/ME'") == 0 || utf8text.find("/ME ") == 0) //Allow CAPSlock /me - { - utf8text.replace(1, 2, "me"); - } - std::string prefix = utf8text.substr(0, 4); - if (prefix != "/me " && prefix != "/me'") - if (mRPMode) utf8text = "[[" + utf8text + "]]"; - + if (mRPMode && prefix != "/me " && prefix != "/me'") + utf8text = "[[" + utf8text + "]]"; // [RLVa:KB] - Checked: 2011-09-17 (RLVa-1.1.4b) | Modified: RLVa-1.1.4b if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) ) { diff --git a/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/indra/newview/skins/default/xui/en-us/floater_chat_history.xml index 3d685ebee..d49ae6213 100644 --- a/indra/newview/skins/default/xui/en-us/floater_chat_history.xml +++ b/indra/newview/skins/default/xui/en-us/floater_chat_history.xml @@ -1,136 +1,48 @@ - - - Connecting to in-world Voice Chat... - - - Connected - - - Voice not available at your current location - - - Disconnected from in-world Voice Chat - - - icn_voice-localchat.tga - - - -- Instant message logging enabled -- - - - -- End of Log -- - - - -'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS]. - - -'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS]. - - - Take in-world money ([CURRENCY]) from you - - - Act on your control inputs - - - Remap your control inputs - - - Animate your avatar - - - Attach to your avatar - - - Release ownership and become public - - - Link and delink from other objects - - - Add and remove joints with other objects - - - Change its permissions - - - Track your camera - - - Control your camera - - - - - - - Gestures - + + Connecting to in-world Voice Chat... + Connected + Voice not available at your current location + Disconnected from in-world Voice Chat + icn_voice-localchat.tga + -- Instant message logging enabled -- + -- End of Log -- + '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS]. + '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS]. + Take in-world money ([CURRENCY]) from you + Act on your control inputs + Remap your control inputs + Animate your avatar + Attach to your avatar + Release ownership and become public + Link and delink from other objects + Add and remove joints with other objects + Change its permissions + Track your camera + Control your camera + + + + Gestures - - - -