aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lllogchat.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lllogchat.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/linden/indra/newview/lllogchat.cpp b/linden/indra/newview/lllogchat.cpp
index b0f3f42..7be9781 100644
--- a/linden/indra/newview/lllogchat.cpp
+++ b/linden/indra/newview/lllogchat.cpp
@@ -33,7 +33,8 @@
33 33
34#include "lllogchat.h" 34#include "lllogchat.h"
35#include "llappviewer.h" 35#include "llappviewer.h"
36 36#include "llfloaterchat.h"
37
37const S32 LOG_RECALL_SIZE = 2048; 38const S32 LOG_RECALL_SIZE = 2048;
38 39
39//static 40//static
@@ -88,7 +89,7 @@ void LLLogChat::saveHistory(LLString filename, LLString line)
88 } 89 }
89} 90}
90 91
91void LLLogChat::loadHistory(LLString filename , void (*callback)(LLString,void*), void* userdata) 92void LLLogChat::loadHistory(LLString filename , void (*callback)(ELogLineType,LLString,void*), void* userdata)
92{ 93{
93 if(!filename.size()) 94 if(!filename.size())
94 { 95 {
@@ -98,6 +99,9 @@ void LLLogChat::loadHistory(LLString filename , void (*callback)(LLString,void*)
98 FILE* fptr = LLFile::fopen(makeLogFileName(filename).c_str(), "r"); /*Flawfinder: ignore*/ 99 FILE* fptr = LLFile::fopen(makeLogFileName(filename).c_str(), "r"); /*Flawfinder: ignore*/
99 if (!fptr) 100 if (!fptr)
100 { 101 {
102 //LLUIString message = LLFloaterChat::getInstance()->getUIString("IM_logging_string");
103 //callback(LOG_EMPTY,"IM_logging_string",userdata);
104 callback(LOG_EMPTY,"",userdata);
101 return; //No previous conversation with this name. 105 return; //No previous conversation with this name.
102 } 106 }
103 else 107 else
@@ -124,14 +128,14 @@ void LLLogChat::loadHistory(LLString filename , void (*callback)(LLString,void*)
124 128
125 if (!firstline) 129 if (!firstline)
126 { 130 {
127 callback(buffer,userdata); 131 callback(LOG_LINE,buffer,userdata);
128 } 132 }
129 else 133 else
130 { 134 {
131 firstline = FALSE; 135 firstline = FALSE;
132 } 136 }
133 } 137 }
134 callback("-- End of Log ---",userdata); 138 callback(LOG_END,"",userdata);
135 139
136 fclose(fptr); 140 fclose(fptr);
137 } 141 }