diff options
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 27 | ||||
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 30 | ||||
-rw-r--r-- | linden/indra/newview/llimpanel.cpp | 35 |
3 files changed, 91 insertions, 1 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index fa2a400..4c9de12 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -1283,6 +1283,33 @@ | |||
1283 | <key>Value</key> | 1283 | <key>Value</key> |
1284 | <integer>0</integer> | 1284 | <integer>0</integer> |
1285 | </map> | 1285 | </map> |
1286 | |||
1287 | <!-- Begin: MUpose --> | ||
1288 | <key>AllowMUpose</key> | ||
1289 | <map> | ||
1290 | <key>Comment</key> | ||
1291 | <string>Allow MU* pose style in chat and IM (with ':' as a synonymous to '/me ')</string> | ||
1292 | <key>Persist</key> | ||
1293 | <integer>1</integer> | ||
1294 | <key>Type</key> | ||
1295 | <string>Boolean</string> | ||
1296 | <key>Value</key> | ||
1297 | <integer>1</integer> | ||
1298 | </map> | ||
1299 | <key>ChatVisible</key> | ||
1300 | <key>AutoCloseOOC</key> | ||
1301 | <map> | ||
1302 | <key>Comment</key> | ||
1303 | <string>Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used)</string> | ||
1304 | <key>Persist</key> | ||
1305 | <integer>1</integer> | ||
1306 | <key>Type</key> | ||
1307 | <string>Boolean</string> | ||
1308 | <key>Value</key> | ||
1309 | <integer>1</integer> | ||
1310 | </map> | ||
1311 | <!-- End: MUpose --> | ||
1312 | |||
1286 | <key>AllowIdleAFK</key> | 1313 | <key>AllowIdleAFK</key> |
1287 | <map> | 1314 | <map> |
1288 | <key>Comment</key> | 1315 | <key>Comment</key> |
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 | } |
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index 9a044d7..be6df5b 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp | |||
@@ -2107,8 +2107,41 @@ void LLFloaterIMPanel::sendMsg() | |||
2107 | { | 2107 | { |
2108 | // store sent line in history, duplicates will get filtered | 2108 | // store sent line in history, duplicates will get filtered |
2109 | if (mInputEditor) mInputEditor->updateHistory(); | 2109 | if (mInputEditor) mInputEditor->updateHistory(); |
2110 | // Truncate and convert to UTF8 for transport | 2110 | |
2111 | // Convert to UTF8 for transport | ||
2111 | std::string utf8_text = wstring_to_utf8str(text); | 2112 | std::string utf8_text = wstring_to_utf8str(text); |
2113 | |||
2114 | if (gSavedSettings.getBOOL("AutoCloseOOC")) | ||
2115 | { | ||
2116 | // Try to find any unclosed OOC chat (i.e. an opening | ||
2117 | // double parenthesis without a matching closing double | ||
2118 | // parenthesis. | ||
2119 | if (utf8_text.find("((") != -1 && utf8_text.find("))") == -1) | ||
2120 | { | ||
2121 | if (utf8_text.at(utf8_text.length() - 1) == ')') | ||
2122 | { | ||
2123 | // cosmetic: add a space first to avoid a closing triple parenthesis | ||
2124 | utf8_text += " "; | ||
2125 | } | ||
2126 | // add the missing closing double parenthesis. | ||
2127 | utf8_text += "))"; | ||
2128 | } | ||
2129 | } | ||
2130 | |||
2131 | // Convert MU*s style poses into IRC emotes here. | ||
2132 | if (gSavedSettings.getBOOL("AllowMUpose") && utf8_text.find(":") == 0 && utf8_text.length() > 3) | ||
2133 | { | ||
2134 | if (utf8_text.find(":'") == 0) | ||
2135 | { | ||
2136 | utf8_text.replace(0, 1, "/me"); | ||
2137 | } | ||
2138 | else if (isalpha(utf8_text.at(1))) // Do not prevent smileys and such. | ||
2139 | { | ||
2140 | utf8_text.replace(0, 1, "/me "); | ||
2141 | } | ||
2142 | } | ||
2143 | |||
2144 | // Truncate and convert to UTF8 for transport | ||
2112 | utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); | 2145 | utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); |
2113 | 2146 | ||
2114 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | 2147 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g |