console/plugins/gnthistory.c

changeset 14296
ac12fbad24f7
parent 14285
f8331daf743d
child 14845
f34a657dacd0
equal deleted inserted replaced
14295:f7b2525313e2 14296:ac12fbad24f7
48 GList *logs = NULL; 48 GList *logs = NULL;
49 const char *alias = name; 49 const char *alias = name;
50 guint flags; 50 guint flags;
51 char *history; 51 char *history;
52 char *header; 52 char *header;
53 GaimMessageFlags mflag;
53 54
54 convtype = gaim_conversation_get_type(c); 55 convtype = gaim_conversation_get_type(c);
55 if (convtype == GAIM_CONV_TYPE_IM) 56 if (convtype == GAIM_CONV_TYPE_IM)
56 { 57 {
57 GSList *buddies; 58 GSList *buddies;
110 } 111 }
111 112
112 if (logs == NULL) 113 if (logs == NULL)
113 return; 114 return;
114 115
116 mflag = GAIM_MESSAGE_NO_LOG | GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_DELAYED;
115 history = gaim_log_read((GaimLog*)logs->data, &flags); 117 history = gaim_log_read((GaimLog*)logs->data, &flags);
116 118
117 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias, 119 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias,
118 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time))); 120 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time)));
119 gaim_conversation_write(c, "", header, GAIM_MESSAGE_NO_LOG, time(NULL)); 121 gaim_conversation_write(c, "", header, mflag, time(NULL));
120 g_free(header); 122 g_free(header);
121 123
122 g_strchomp(history); 124 g_strchomp(history);
123 gaim_conversation_write(c, "", history, GAIM_MESSAGE_NO_LOG, time(NULL)); 125 gaim_conversation_write(c, "", history, mflag, time(NULL));
124 g_free(history); 126 g_free(history);
125 127
126 gaim_conversation_write(c, "", "\n---------------\n", GAIM_MESSAGE_NO_LOG, time(NULL)); 128 gaim_conversation_write(c, "", "<hr>", mflag, time(NULL));
127 129
128 g_list_foreach(logs, (GFunc)gaim_log_free, NULL); 130 g_list_foreach(logs, (GFunc)gaim_log_free, NULL);
129 g_list_free(logs); 131 g_list_free(logs);
130 } 132 }
131 133

mercurial