Timestamping server messages
Resolves #6641
(cherry picked from commit 3f1da792cb
)
This commit is contained in:
parent
f790bd922c
commit
b5ce501088
1 changed files with 3 additions and 0 deletions
|
@ -1950,6 +1950,9 @@ void game::send_server_message(const char* message, std::optional<player_iterato
|
|||
|
||||
msg.set_attr("id", "server");
|
||||
msg.set_attr_dup("message", message);
|
||||
std::stringstream ss;
|
||||
ss << ::std::time(nullptr);
|
||||
msg.set_attr_dup("time", ss.str().c_str());
|
||||
} else {
|
||||
simple_wml::node& msg = doc.root().add_child("message");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue