comparison src/server.c @ 4873:cb5bb2972a4b

[gaim-migrate @ 5203] James Vega (jamessan) writes: "Currently, when people login or logout when an IM window is open, this is reported to the window. This happens regardless of whether the 'Show logins in window' option is checked. The patch adds the extra checks to make sure this option works correctly." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 23 Mar 2003 15:54:29 +0000
parents 7bdda84b5431
children 21cfdb9af2eb
comparison
equal deleted inserted replaced
4872:e6dbac19a8d5 4873:cb5bb2972a4b
902 902
903 903
904 if (loggedin) { 904 if (loggedin) {
905 if (!b->present == 1) { 905 if (!b->present == 1) {
906 struct gaim_conversation *c = gaim_find_conversation(b->name); 906 struct gaim_conversation *c = gaim_find_conversation(b->name);
907 if (c) { 907 if (c && (im_options & OPT_IM_LOGON)) {
908 char *tmp = g_strdup_printf(_("%s logged in."), gaim_get_buddy_alias(b)); 908 char *tmp = g_strdup_printf(_("%s logged in."), gaim_get_buddy_alias(b));
909 gaim_conversation_write(c, NULL, tmp, -1, 909 gaim_conversation_write(c, NULL, tmp, -1,
910 WFLAG_SYSTEM, time(NULL)); 910 WFLAG_SYSTEM, time(NULL));
911 g_free(tmp); 911 g_free(tmp);
912 } else if (awayqueue && find_queue_total_by_name(b->name)) { 912 } else if (awayqueue && find_queue_total_by_name(b->name)) {
926 system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON); 926 system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON);
927 } 927 }
928 } else { 928 } else {
929 if (b->present == 1) { 929 if (b->present == 1) {
930 struct gaim_conversation *c = gaim_find_conversation(b->name); 930 struct gaim_conversation *c = gaim_find_conversation(b->name);
931 if (c) { 931 if (c && (im_options & OPT_IM_LOGON)) {
932 char *tmp = g_strdup_printf(_("%s logged out."), gaim_get_buddy_alias(b)); 932 char *tmp = g_strdup_printf(_("%s logged out."), gaim_get_buddy_alias(b));
933 gaim_conversation_write(c, NULL, tmp, -1, 933 gaim_conversation_write(c, NULL, tmp, -1,
934 WFLAG_SYSTEM, time(NULL)); 934 WFLAG_SYSTEM, time(NULL));
935 g_free(tmp); 935 g_free(tmp);
936 } else if (awayqueue && find_queue_total_by_name(b->name)) { 936 } else if (awayqueue && find_queue_total_by_name(b->name)) {