comparison plugins/timestamp.c @ 4376:2c985a9e994c

[gaim-migrate @ 4642] The conversations list is no longer public, and shouldn't have been in aim.c. This should fix some crashes that may have resulted in the notify and timestamp plugins. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 21 Jan 2003 05:20:10 +0000
parents 5fb47ec9bfe4
children 1f3241831734
comparison
equal deleted inserted replaced
4375:90eaa3486949 4376:2c985a9e994c
24 struct gaim_conversation *c = (struct gaim_conversation *)data; 24 struct gaim_conversation *c = (struct gaim_conversation *)data;
25 char *buf; 25 char *buf;
26 char mdate[6]; 26 char mdate[6];
27 time_t tim = time(NULL); 27 time_t tim = time(NULL);
28 28
29 if (!g_list_find(conversations, c)) 29 if (!g_list_find(gaim_get_conversations(), c))
30 return FALSE; 30 return FALSE;
31 31
32 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim)); 32 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim));
33 buf = g_strdup_printf(" %s", mdate); 33 buf = g_strdup_printf(" %s", mdate);
34 gaim_conversation_write(c, NULL, buf, WFLAG_NOLOG, tim, -1); 34 gaim_conversation_write(c, NULL, buf, WFLAG_NOLOG, tim, -1);
97 return ret; 97 return ret;
98 } 98 }
99 99
100 100
101 char *gaim_plugin_init(GModule *h) { 101 char *gaim_plugin_init(GModule *h) {
102 GList *cnvs = conversations; 102 GList *cnvs = gaim_get_conversations();
103 struct gaim_conversation *c; 103 struct gaim_conversation *c;
104 handle = h; 104 handle = h;
105 105
106 while (cnvs) { 106 while (cnvs) {
107 c = cnvs->data; 107 c = cnvs->data;