Le patch suivant ajoute le jour à chaque ligne comme un numéro à deux chiffres. Par exemple dans le fichier chat_log_Crayona_201311.txt:
Le changement étant assez simple, je copie le diff ici:05 [15:51:35] Galein'th Aseyis
05 [15:51:36] Tu entends résonner une alarme au loin : le territoire Homme bleu est
05 [15:51:50] [Ordar @ 3]: Je cherche un coursier pour l'achat de livre
05 [15:51:53] Tu es rentré dans l'enclos.
05 [15:52:02] Tu es sorti(e) de l'enclos.
Code : Tout sélectionner
diff --git a/text.c b/text.c
index b97e31a..9386848 100644
--- a/text.c
+++ b/text.c
@@ -304,18 +304,11 @@ void write_to_log (Uint8 channel, const Uint8* const data, int
        // The file we'll write to
        fout = (channel == CHAT_SERVER && log_chat >= 3) ? srv_log : chat_log;
 
-       if(!show_timestamp)
-       {
-       // Start filling the buffer with the time stamp
-       time (&c_time);
-       l_time = localtime (&c_time);
-       j = strftime (str, sizeof(str), "[%H:%M:%S] ", l_time);
-       }
-       else
-       {
-               //we already have a time stamp
-               j=0;
-       }
+       time(&c_time);
+       l_time = localtime(&c_time);
+       // 'data' already contains timestamp if 'show_timestamp'
+       j = strftime(str, sizeof(str), show_timestamp
+                    ? "%d " : "%d [%H:%M:%S] ", l_time);
 
        i = 0;
        while (i < len)
