Index: binaries/data/config/default.cfg
===================================================================
--- binaries/data/config/default.cfg (revision 18735)
+++ binaries/data/config/default.cfg (working copy)
@@ -348,12 +348,17 @@ pan.y = 1
rotate.x = 3
rotate.y = 2
zoom.in = 5
zoom.out = 4
+[chat]
+timestamp = false ; Show time chat message was posted
+
+[chat.session]
+extended = true ; Whether to display the chat history
+
[lobby]
-chattimestamp = false ; Show time chat message was posted
history = 0 ; Number of past messages to display on join
room = "arena21" ; Default MUC room to join
server = "lobby.wildfiregames.com" ; Address of lobby server
xpartamupp = "wfgbot21" ; Name of the server-side xmpp client that manage games
Index: binaries/data/mods/public/gui/common/styles.xml
===================================================================
--- binaries/data/mods/public/gui/common/styles.xml (revision 18735)
+++ binaries/data/mods/public/gui/common/styles.xml (working copy)
@@ -188,6 +188,19 @@
scroll_bottom="false"
textcolor="white"
text_align="left"
text_valign="top"
/>
+
+
+
Index: binaries/data/mods/public/gui/gamesetup/gamesetup.js
===================================================================
--- binaries/data/mods/public/gui/gamesetup/gamesetup.js (revision 18735)
+++ binaries/data/mods/public/gui/gamesetup/gamesetup.js (working copy)
@@ -1792,11 +1792,21 @@ function addChatMessage(msg)
if (!g_FormatChatMessage[msg.type])
return;
let user = colorizePlayernameByGUID(msg.guid || -1, msg.username || "");
- g_ChatMessages.push(g_FormatChatMessage[msg.type](msg, user));
+ let text = g_FormatChatMessage[msg.type](msg, user);
+
+ if (Engine.ConfigDB_GetValue("user", "chat.timestamp") == "true")
+ text = sprintf(translate("%(time)s %(message)s"), {
+ "time": sprintf(translate("\\[%(time)s]"), {
+ "time": Engine.FormatMillisecondsIntoDateString(new Date().getTime(), translate("HH:mm"))
+ }),
+ "message": text
+ });
+
+ g_ChatMessages.push(text);
Engine.GetGUIObjectByName("chatText").caption = g_ChatMessages.join("\n");
}
function showMoreOptions(show)
Index: binaries/data/mods/public/gui/gamesetup/styles.xml
===================================================================
--- binaries/data/mods/public/gui/gamesetup/styles.xml (revision 18735)
+++ binaries/data/mods/public/gui/gamesetup/styles.xml (working copy)
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
Index: binaries/data/mods/public/gui/lobby/lobby.js
===================================================================
--- binaries/data/mods/public/gui/lobby/lobby.js (revision 18735)
+++ binaries/data/mods/public/gui/lobby/lobby.js (working copy)
@@ -7,15 +7,10 @@ const g_MapSizes = prepareForDropdown(g_
* Used for the gamelist-filtering.
*/
const g_MapTypes = prepareForDropdown(g_Settings && g_Settings.MapTypes);
/**
- * Whether or not to display timestamps in the chat window.
- */
-const g_ShowTimestamp = Engine.ConfigDB_GetValue("user", "lobby.chattimestamp") == "true";
-
-/**
* Mute clients who exceed the rate of 1 message per second for this time
*/
const g_SpamBlockTimeframe = 5;
/**
@@ -969,11 +964,11 @@ function ircFormat(msg)
"message": msg.text
});
}
// Add chat message timestamp
- if (!g_ShowTimestamp)
+ if (Engine.ConfigDB_GetValue("user", "chat.timestamp") != "true")
return formattedMessage;
let time;
if (msg.datetime)
{
Index: binaries/data/mods/public/gui/lobby/styles.xml
===================================================================
--- binaries/data/mods/public/gui/lobby/styles.xml (revision 18735)
+++ binaries/data/mods/public/gui/lobby/styles.xml (working copy)
@@ -1,20 +1,8 @@
-
-