Store and format time in CBufLine.

Buflines need to know which part of text to wrap with the timestamp. The
second parameter to `AddLine` (and shorthands) is that text, which after
wrapping is added as the `text` parameter to `NamedFormat`.

Timestamps are formatted at the moment buffers are flushed to the
client. The client parameter to `GetLine` provides access to the User
and the new server-time capability.
This commit is contained in:
Stéphan Kochen
2011-10-16 23:05:42 +02:00
parent c3d677a4d8
commit c36480c8a1
14 changed files with 89 additions and 52 deletions

View File

@@ -116,6 +116,7 @@ public:
for (it = vsLines.begin(); it != vsLines.end(); ++it) {
CString sLine(*it);
sLine.Trim();
// FIXME: Deserialize other CBufLine attributes.
pChan->AddBuffer(sLine);
}
} else
@@ -151,6 +152,7 @@ public:
unsigned int uSize = Buffer.Size();
for (unsigned int uIdx = 0; uIdx < uSize; uIdx++) {
const CBufLine& Line = Buffer.GetBufLine(uIdx);
// FIXME: Serialize other CBufLine attributes.
sFile += Line.GetFormat() + "\n";
}