mirror of
https://github.com/znc/znc.git
synced 2026-05-09 23:04:47 +02:00
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:
@@ -22,7 +22,7 @@ public:
|
||||
if (!Channel.KeepBuffer() && m_pNetwork->IsUserOnline())
|
||||
return;
|
||||
|
||||
Channel.AddBuffer(":" + GetModNick() + "!" + GetModName() + "@znc.in PRIVMSG " + _NAMEDFMT(Channel.GetName()) + " :" + _NAMEDFMT(m_pUser->AddTimestamp(sMessage)));
|
||||
Channel.AddBuffer(":" + GetModNick() + "!" + GetModName() + "@znc.in PRIVMSG " + _NAMEDFMT(Channel.GetName()) + " :{text}", sMessage);
|
||||
}
|
||||
|
||||
virtual void OnRawMode(const CNick& OpNick, CChan& Channel, const CString& sModes, const CString& sArgs) {
|
||||
|
||||
Reference in New Issue
Block a user