Mercurial > pidgin
comparison src/server.c @ 1764:1e0613d9526b
[gaim-migrate @ 1774]
I decided to do the time stamp w/ messages thing that Eric put in the TODO list.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 27 Apr 2001 23:26:19 +0000 |
parents | 5bfc58c20e82 |
children | 9aae465eeb6e |
comparison
equal
deleted
inserted
replaced
1763:5ad0b0c3ea01 | 1764:1e0613d9526b |
---|---|
309 serv_touch_idle(g); | 309 serv_touch_idle(g); |
310 } | 310 } |
311 | 311 |
312 | 312 |
313 | 313 |
314 void serv_got_im(struct gaim_connection *gc, char *name, char *message, int away) | 314 void serv_got_im(struct gaim_connection *gc, char *name, char *message, int away, time_t mtime) |
315 { | 315 { |
316 struct conversation *cnv; | 316 struct conversation *cnv; |
317 int new_conv = 0; | 317 int new_conv = 0; |
318 | 318 |
319 char *buffy = g_strdup(message); | 319 char *buffy = g_strdup(message); |
368 return; | 368 return; |
369 } | 369 } |
370 if (cnv != NULL) { | 370 if (cnv != NULL) { |
371 if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) | 371 if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) |
372 play_sound(RECEIVE); | 372 play_sound(RECEIVE); |
373 write_to_conv(cnv, message, away | WFLAG_RECV, NULL); | 373 write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime); |
374 } | 374 } |
375 | 375 |
376 } else { | 376 } else { |
377 if (cnv == NULL) { | 377 if (cnv == NULL) { |
378 new_conv = 1; | 378 new_conv = 1; |
386 play_sound(FIRST_RECEIVE); | 386 play_sound(FIRST_RECEIVE); |
387 } else { | 387 } else { |
388 if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) | 388 if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) |
389 play_sound(RECEIVE); | 389 play_sound(RECEIVE); |
390 } | 390 } |
391 write_to_conv(cnv, message, away | WFLAG_RECV, NULL); | 391 write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime); |
392 } | 392 } |
393 | 393 |
394 | 394 |
395 | 395 |
396 | 396 |
412 tmpmsg = stylize(gc->away, MSG_LEN); | 412 tmpmsg = stylize(gc->away, MSG_LEN); |
413 | 413 |
414 serv_send_im(gc, name, away_subs(tmpmsg, alias), 1); | 414 serv_send_im(gc, name, away_subs(tmpmsg, alias), 1); |
415 | 415 |
416 if (cnv != NULL) | 416 if (cnv != NULL) |
417 write_to_conv(cnv, away_subs(tmpmsg, alias), WFLAG_SEND | WFLAG_AUTO, NULL); | 417 write_to_conv(cnv, away_subs(tmpmsg, alias), WFLAG_SEND | WFLAG_AUTO, NULL, mtime); |
418 g_free(tmpmsg); | 418 g_free(tmpmsg); |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 | 422 |
721 | 721 |
722 g_string_free(b->history, TRUE); | 722 g_string_free(b->history, TRUE); |
723 g_free(b); | 723 g_free(b); |
724 } | 724 } |
725 | 725 |
726 void serv_got_chat_in(struct gaim_connection *g, int id, char *who, int whisper, char *message) | 726 void serv_got_chat_in(struct gaim_connection *g, int id, char *who, int whisper, char *message, time_t mtime) |
727 { | 727 { |
728 int w; | 728 int w; |
729 GSList *bcs = g->buddy_chats; | 729 GSList *bcs = g->buddy_chats; |
730 struct conversation *b = NULL; | 730 struct conversation *b = NULL; |
731 | 731 |
750 if (whisper) | 750 if (whisper) |
751 w = WFLAG_WHISPER; | 751 w = WFLAG_WHISPER; |
752 else | 752 else |
753 w = 0; | 753 w = 0; |
754 | 754 |
755 chat_write(b, who, w, message); | 755 chat_write(b, who, w, message, mtime); |
756 } | 756 } |
757 | 757 |
758 void send_keepalive(gpointer d) | 758 void send_keepalive(gpointer d) |
759 { | 759 { |
760 struct gaim_connection *gc = (struct gaim_connection *)d; | 760 struct gaim_connection *gc = (struct gaim_connection *)d; |