Mercurial > pidgin.yaz
diff src/buddy_chat.c @ 612:12bb64b42ad1
[gaim-migrate @ 622]
show logons/logoffs in chat window.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 05 Aug 2000 01:49:49 +0000 |
parents | 0b1a132e0f75 |
children | 9f168ba28ac2 |
line wrap: on
line diff
--- a/src/buddy_chat.c Sat Aug 05 01:23:46 2000 +0000 +++ b/src/buddy_chat.c Sat Aug 05 01:49:49 2000 +0000 @@ -426,6 +426,7 @@ void add_chat_buddy(struct conversation *b, char *buddy) { char *name = g_strdup(buddy); + char tmp[BUF_LONG]; #ifdef GAIM_PLUGINS GList *c = callbacks; @@ -440,13 +441,17 @@ c = c->next; } #endif - b->in_room = g_list_append(b->in_room, name); update_chat_list(b); if (b->makesound && (sound_options & OPT_SOUND_CHAT_JOIN)) play_sound(BUDDY_ARRIVE); + + if (display_options & OPT_DISP_CHAT_LOGON) { + g_snprintf(tmp, sizeof(tmp), _("<B>%s entered the room.</B>"), name); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL); + } } @@ -455,6 +460,7 @@ void remove_chat_buddy(struct conversation *b, char *buddy) { GList *names = b->in_room; + char tmp[BUF_LONG]; #ifdef GAIM_PLUGINS GList *c = callbacks; @@ -481,6 +487,11 @@ if (b->makesound && (sound_options & OPT_SOUND_CHAT_JOIN)) play_sound(BUDDY_LEAVE); + + if (display_options & OPT_DISP_CHAT_LOGON) { + g_snprintf(tmp, sizeof(tmp), _("<B>%s left the room.</B>"), buddy); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL); + } }