summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterchat.cpp
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2007-06-21 22:40:22 +0000
committerKelly Washington <kelly@lindenlab.com>2007-06-21 22:40:22 +0000
commite03bb0606a10f29c8b94909a713a5bb5c69e88b7 (patch)
tree6d8d07894579438c8cc70e08f5730c3c95dfe768 /indra/newview/llfloaterchat.cpp
parent2638f12f95eea692502836cf6548b4a0b234d009 (diff)
merge -r62831:64079 branches/maintenance to release
Diffstat (limited to 'indra/newview/llfloaterchat.cpp')
-rw-r--r--indra/newview/llfloaterchat.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 93eb24f36d..75c68acb78 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -130,12 +130,22 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLString& line, const
edit->appendColoredText(line, false, prepend_newline, color);
}
+void log_chat_text(const LLChat& chat)
+{
+ LLString histstr;
+ if (gSavedPerAccountSettings.getBOOL("LogChatTimestamp"))
+ histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText;
+ else
+ histstr = chat.mText;
+
+ LLLogChat::saveHistory("chat",histstr);
+}
// static
void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
{
if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file)
{
- LLLogChat::saveHistory("chat",chat.mText);
+ log_chat_text(chat);
}
LLColor4 color = get_text_color(chat);
@@ -344,10 +354,14 @@ void LLFloaterChat::addChat(const LLChat& chat,
gConsole->addLine(chat.mText, size, text_color);
}
- if( !from_instant_message || gSavedSettings.getBOOL("IMInChatHistory") )
- {
+ if(from_instant_message && gSavedPerAccountSettings.getBOOL("LogChatIM"))
+ log_chat_text(chat);
+
+ if(from_instant_message && gSavedSettings.getBOOL("IMInChatHistory"))
+ addChatHistory(chat,false);
+
+ if(!from_instant_message)
addChatHistory(chat);
- }
}
LLColor4 get_text_color(const LLChat& chat)
@@ -380,6 +394,10 @@ LLColor4 get_text_color(const LLChat& chat)
{
text_color = gSavedSettings.getColor4("ScriptErrorColor");
}
+ else if ( chat.mChatType == CHAT_TYPE_OWNER )
+ {
+ text_color = gSavedSettings.getColor4("llOwnerSayChatColor");
+ }
else
{
text_color = gSavedSettings.getColor4("ObjectChatColor");