diff options
Diffstat (limited to 'linden/indra/newview/llchatbar.cpp')
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 8401138..bbf6b04 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -410,6 +410,36 @@ void LLChatBar::sendChat( EChatType type ) | |||
410 | std::string utf8_revised_text; | 410 | std::string utf8_revised_text; |
411 | if (0 == channel) | 411 | if (0 == channel) |
412 | { | 412 | { |
413 | if (gSavedSettings.getBOOL("AutoCloseOOC")) | ||
414 | { | ||
415 | // Try to find any unclosed OOC chat (i.e. an opening | ||
416 | // double parenthesis without a matching closing double | ||
417 | // parenthesis. | ||
418 | if (utf8text.find("((") != -1 && utf8text.find("))") == -1) | ||
419 | { | ||
420 | if (utf8text.at(utf8text.length() - 1) == ')') | ||
421 | { | ||
422 | // cosmetic: add a space first to avoid a closing triple parenthesis | ||
423 | utf8text += " "; | ||
424 | } | ||
425 | // add the missing closing double parenthesis. | ||
426 | utf8text += "))"; | ||
427 | } | ||
428 | } | ||
429 | |||
430 | // Convert MU*s style poses into IRC emotes here. | ||
431 | if (gSavedSettings.getBOOL("AllowMUpose") && utf8text.find(":") == 0 && utf8text.length() > 3) | ||
432 | { | ||
433 | if (utf8text.find(":'") == 0) | ||
434 | { | ||
435 | utf8text.replace(0, 1, "/me"); | ||
436 | } | ||
437 | else if (isalpha(utf8text.at(1))) // Do not prevent smileys and such. | ||
438 | { | ||
439 | utf8text.replace(0, 1, "/me "); | ||
440 | } | ||
441 | } | ||
442 | |||
413 | // discard returned "found" boolean | 443 | // discard returned "found" boolean |
414 | gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text); | 444 | gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text); |
415 | } | 445 | } |