summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychat.cpp
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-02-02 14:37:31 +0200
committerIgor Borovkov <iborovkov@productengine.com>2010-02-02 14:37:31 +0200
commit0763fac7653d0c280ed2fd808f2c1bb594c2e804 (patch)
treeeb22d8f60ecbeb3cbf3aeaf0eb5b3fb5e25df124 /indra/newview/llnearbychat.cpp
parentf69510e20c14f8afbdaa9fad06f7dbb2ba09b774 (diff)
added saving of nearby chat history - EXT-4777 Implement saving and loading chat history for Nearby Chat (both plain text and widgeted chat)
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r--indra/newview/llnearbychat.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 1dcb6abf81..49ab61556f 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -200,6 +200,18 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
mMessageArchive.push_back(chat);
if(mMessageArchive.size()>200)
mMessageArchive.erase(mMessageArchive.begin());
+
+ if (gSavedPerAccountSettings.getBOOL("LogChat"))
+ {
+ if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT)
+ {
+ LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText);
+ }
+ else
+ {
+ LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText);
+ }
+ }
}
}