comparison src/protocols/oscar/oscar.c @ 2137:18722ae5b882

[gaim-migrate @ 2147] i guess. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 08 Aug 2001 19:55:12 +0000
parents acc11216ec5d
children 1fc962350561
comparison
equal deleted inserted replaced
2136:73253b36c3cb 2137:18722ae5b882
1693 va_end(ap); 1693 va_end(ap);
1694 1694
1695 #if USE_PIXBUF 1695 #if USE_PIXBUF
1696 if (args->icbmflags & AIM_IMFLAGS_HASICON) { 1696 if (args->icbmflags & AIM_IMFLAGS_HASICON) {
1697 struct oscar_data *od = gc->proto_data; 1697 struct oscar_data *od = gc->proto_data;
1698 struct icon_req *ir; 1698 struct icon_req *ir = NULL;
1699 GSList *h = od->hasicons; 1699 GSList *h = od->hasicons;
1700 char *who = normalize(userinfo->sn); 1700 char *who = normalize(userinfo->sn);
1701 debug_printf("%s has an icon\n", userinfo->sn); 1701 debug_printf("%s has an icon\n", userinfo->sn);
1702 while (h) { 1702 while (h) {
1703 ir = h->data; 1703 ir = h->data;
1997 struct command_rx_struct *command, ...) { 1997 struct command_rx_struct *command, ...) {
1998 struct aim_userinfo_s *info; 1998 struct aim_userinfo_s *info;
1999 char *prof_enc = NULL, *prof = NULL; 1999 char *prof_enc = NULL, *prof = NULL;
2000 unsigned short infotype; 2000 unsigned short infotype;
2001 char buf[BUF_LONG]; 2001 char buf[BUF_LONG];
2002 char legend[BUF_LONG];
2002 struct gaim_connection *gc = sess->aux_data; 2003 struct gaim_connection *gc = sess->aux_data;
2003 va_list ap; 2004 va_list ap;
2004 char *asc; 2005 char *asc;
2005 2006
2006 va_start(ap, command); 2007 va_start(ap, command);
2019 g_snprintf(buf, sizeof buf, 2020 g_snprintf(buf, sizeof buf,
2020 _("Username : <B>%s</B> %s <BR>\n" 2021 _("Username : <B>%s</B> %s <BR>\n"
2021 "%s" 2022 "%s"
2022 "Warning Level : <B>%d %%</B><BR>\n" 2023 "Warning Level : <B>%d %%</B><BR>\n"
2023 "Online Since : <B>%s</B><BR>\n" 2024 "Online Since : <B>%s</B><BR>\n"
2024 "Idle Minutes : <B>%d</B>\n<BR>\n<HR><BR>\n" 2025 "Idle Minutes : <B>%d</B>\n<BR>\n<HR><BR>\n"),
2025 "%s"
2026 "<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>"
2027 "<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>"
2028 "<IMG SRC=\"aol_icon.gif\"> : AOL User <br>"
2029 "<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>"
2030 "<IMG SRC=\"admin_icon.gif\"> : Administrator"),
2031 info->sn, images(info->flags), 2026 info->sn, images(info->flags),
2032 asc, 2027 asc,
2033 info->warnlevel/10, 2028 info->warnlevel/10,
2034 asctime(localtime(&info->onlinesince)), 2029 asctime(localtime(&info->onlinesince)),
2035 info->idletime, 2030 info->idletime);
2036 (prof && strlen(prof)) ? 2031 g_snprintf(legend, sizeof legend,
2037 (infotype == AIM_GETINFO_GENERALINFO ? 2032 _("<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>"
2038 prof : 2033 "<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>"
2039 away_subs(prof, gc->username)) 2034 "<IMG SRC=\"aol_icon.gif\"> : AOL User <br>"
2035 "<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>"
2036 "<IMG SRC=\"admin_icon.gif\"> : Administrator"));
2037 g_show_info_text(buf,
2038 (prof && strlen(prof)) ?
2039 away_subs(prof, gc->username)
2040 : 2040 :
2041 (infotype == AIM_GETINFO_GENERALINFO ? 2041 (infotype == AIM_GETINFO_GENERALINFO ?
2042 _("<i>No Information Provided</i>") : 2042 _("<i>No Information Provided</i>") :
2043 _("<i>User has no away message</i>"))); 2043 _("<i>User has no away message</i>")),
2044 2044 legend,
2045 g_show_info_text(away_subs(buf, gc->username)); 2045 NULL);
2046 2046
2047 g_free(asc); 2047 g_free(asc);
2048 2048
2049 return 1; 2049 return 1;
2050 } 2050 }
2396 len = num * (MAXSNLEN + 1) + 1024; 2396 len = num * (MAXSNLEN + 1) + 1024;
2397 buf = g_malloc(len); 2397 buf = g_malloc(len);
2398 at += g_snprintf(buf + at, len - at, "<B>%s has the following screen names:</B><BR>", address); 2398 at += g_snprintf(buf + at, len - at, "<B>%s has the following screen names:</B><BR>", address);
2399 for (i = 0; i < num; i++) 2399 for (i = 0; i < num; i++)
2400 at += g_snprintf(buf + at, len - at, "%s<BR>", &SNs[i * (MAXSNLEN + 1)]); 2400 at += g_snprintf(buf + at, len - at, "%s<BR>", &SNs[i * (MAXSNLEN + 1)]);
2401 g_show_info_text(buf); 2401 g_show_info_text(buf, NULL);
2402 g_free(buf); 2402 g_free(buf);
2403 2403
2404 return 1; 2404 return 1;
2405 } 2405 }
2406 2406
2489 return aim_send_im(odata->sess, odata->conn, name, AIM_IMFLAGS_AWAY, message); 2489 return aim_send_im(odata->sess, odata->conn, name, AIM_IMFLAGS_AWAY, message);
2490 else { 2490 else {
2491 int flags = AIM_IMFLAGS_ACK; 2491 int flags = AIM_IMFLAGS_ACK;
2492 #if USE_PIXBUF 2492 #if USE_PIXBUF
2493 GSList *h = odata->hasicons; 2493 GSList *h = odata->hasicons;
2494 struct icon_req *ir; 2494 struct icon_req *ir = NULL;
2495 char *who = normalize(name); 2495 char *who = normalize(name);
2496 while (h) { 2496 while (h) {
2497 ir = h->data; 2497 ir = h->data;
2498 if (ir->request && !strcmp(who, ir->user)) 2498 if (ir->request && !strcmp(who, ir->user))
2499 break; 2499 break;