mcabber/src/histolog.c
changeset 184 b5aa2b9c425a
parent 183 c658c131ea10
child 186 888ad9f15346
--- a/mcabber/src/histolog.c	Thu May 05 15:01:48 2005 +0000
+++ b/mcabber/src/histolog.c	Thu May 05 19:38:44 2005 +0000
@@ -101,12 +101,12 @@
 void hlog_read_history(const char *jid, GList **p_buddyhbuf, guint width)
 {
   char *filename;
-  time_t timestamp;
   guchar type, info;
   char *data, *tail;
+  time_t timestamp;
+  guint prefix_flags;
   guint len;
   FILE *fp;
-  char prefix[32];
 
   if (!FileLoadLogs) return;
 
@@ -155,12 +155,11 @@
       *(tail-1) = 0;
 
     if (type == 'M') {
-      strftime(prefix, 12, "[%H:%M] ", localtime(&timestamp));
       if (info == 'S')
-        strcat(prefix, "--> ");
+        prefix_flags = HBB_PREFIX_OUT;
       else
-        strcat(prefix, "<== ");
-      hbuf_add_line(p_buddyhbuf, &data[18], prefix, width);
+        prefix_flags = HBB_PREFIX_IN;
+      hbuf_add_line(p_buddyhbuf, &data[18], timestamp, prefix_flags, width);
     }
   }
   fclose(fp);