comparison src/oscar.c @ 1837:31f7780b72b8

[gaim-migrate @ 1847] here you go mid committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 11 May 2001 08:06:13 +0000
parents 086213e7fb73
children bee2239f5952
comparison
equal deleted inserted replaced
1836:703a567ec4bf 1837:31f7780b72b8
52 /* constants to identify proto_opts */ 52 /* constants to identify proto_opts */
53 #define USEROPT_AUTH 0 53 #define USEROPT_AUTH 0
54 #define USEROPT_AUTHPORT 1 54 #define USEROPT_AUTHPORT 1
55 #define USEROPT_SOCKSHOST 2 55 #define USEROPT_SOCKSHOST 2
56 #define USEROPT_SOCKSPORT 3 56 #define USEROPT_SOCKSPORT 3
57
58 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3"
57 59
58 int gaim_caps = AIM_CAPS_CHAT | AIM_CAPS_GETFILE | AIM_CAPS_IMIMAGE; 60 int gaim_caps = AIM_CAPS_CHAT | AIM_CAPS_GETFILE | AIM_CAPS_IMIMAGE;
59 61
60 static GtkWidget *join_chat_spin = NULL; 62 static GtkWidget *join_chat_spin = NULL;
61 static GtkWidget *join_chat_entry = NULL; 63 static GtkWidget *join_chat_entry = NULL;
635 close(pos->conn->fd); 637 close(pos->conn->fd);
636 aim_conn_kill(od->sess, &pos->conn); 638 aim_conn_kill(od->sess, &pos->conn);
637 g_free(pos); 639 g_free(pos);
638 return; 640 return;
639 } 641 }
640 g_snprintf(buf, sizeof(buf), "GET http://gaim.sourceforge.net/aim_data.php3?" 642 g_snprintf(buf, sizeof(buf), "GET " AIMHASHDATA
641 "offset=%ld&len=%ld&modname=%s HTTP/1.0\n\n", 643 "?offset=%ld&len=%ld&modname=%s HTTP/1.0\n\n",
642 pos->offset, pos->len, pos->modname ? pos->modname : ""); 644 pos->offset, pos->len, pos->modname ? pos->modname : "");
643 write(pos->conn->fd, buf, strlen(buf)); 645 write(pos->conn->fd, buf, strlen(buf));
644 if (pos->modname) 646 if (pos->modname)
645 g_free(pos->modname); 647 g_free(pos->modname);
646 gdk_input_remove(pos->inpa); 648 gdk_input_remove(pos->inpa);
1497 char *prof_enc = NULL, *prof = NULL; 1499 char *prof_enc = NULL, *prof = NULL;
1498 u_short infotype; 1500 u_short infotype;
1499 char buf[BUF_LONG]; 1501 char buf[BUF_LONG];
1500 struct gaim_connection *gc = sess->aux_data; 1502 struct gaim_connection *gc = sess->aux_data;
1501 va_list ap; 1503 va_list ap;
1504 char *asc;
1502 1505
1503 va_start(ap, command); 1506 va_start(ap, command);
1504 info = va_arg(ap, struct aim_userinfo_s *); 1507 info = va_arg(ap, struct aim_userinfo_s *);
1505 prof_enc = va_arg(ap, char *); 1508 prof_enc = va_arg(ap, char *);
1506 prof = va_arg(ap, char *); 1509 prof = va_arg(ap, char *);
1507 infotype = (u_short)va_arg(ap, u_int); 1510 infotype = (u_short)va_arg(ap, u_int);
1508 va_end(ap); 1511 va_end(ap);
1509 1512
1510 if (prof == NULL || !strlen(prof)) { 1513 asc = g_strdup(asctime(localtime(&info->membersince)));
1511 /* no info/away message */ 1514
1512 char buf[1024]; 1515 g_snprintf(buf, sizeof buf,
1513 sprintf(buf, _("%s has no %s."), info->sn, 1516 _("Username : <B>%s</B> %s <BR>\n"
1514 (infotype == AIM_GETINFO_GENERALINFO) ? "information" : "away message"); 1517 "Member Since : <B>%s</B>\n"
1515 do_error_dialog(buf, _("Gaim - Error")); 1518 "Warning Level : <B>%d %%</B><BR>\n"
1516 plugin_event(event_error, (void *)977, 0, 0, 0); 1519 "Online Since : <B>%s</B><BR>\n"
1517 return 1; 1520 "Idle Minutes : <B>%d</B>\n<BR>\n<HR><BR>\n"
1518 } 1521 "%s"
1519 1522 "<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>"
1520 g_snprintf(buf, sizeof buf, _("Username : <B>%s</B> %s <BR>\n" 1523 "<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>"
1521 "Warning Level : <B>%d %%</B><BR>\n" 1524 "<IMG SRC=\"aol_icon.gif\"> : AOL User <br>"
1522 "Online Since : <B>%s</B><BR>\n" 1525 "<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>"
1523 "Idle Minutes : <B>%d</B>\n<BR>\n<HR><BR>\n" 1526 "<IMG SRC=\"admin_icon.gif\"> : Administrator"),
1524 "%s" 1527 info->sn, images(info->flags),
1525 "<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>" 1528 asc,
1526 "<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>" 1529 info->warnlevel/10,
1527 "<IMG SRC=\"aol_icon.gif\"> : AOL User <br>" 1530 asctime(localtime(&info->onlinesince)),
1528 "<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>" 1531 info->idletime,
1529 "<IMG SRC=\"admin_icon.gif\"> : Administrator"), 1532 (prof && strlen(prof)) ?
1530 info->sn, images(info->flags), 1533 (infotype == AIM_GETINFO_GENERALINFO ?
1531 info->warnlevel/10, 1534 prof :
1532 asctime(localtime(&info->onlinesince)), 1535 away_subs(prof, gc->username))
1533 info->idletime, 1536 :
1534 infotype == AIM_GETINFO_GENERALINFO ? prof : 1537 (infotype == AIM_GETINFO_GENERALINFO ?
1535 away_subs(prof, gc->username)); 1538 _("<i>No Information Provided</i>") :
1539 _("<i>User has no away message</i>")));
1540
1536 g_show_info_text(away_subs(buf, gc->username)); 1541 g_show_info_text(away_subs(buf, gc->username));
1542
1543 g_free(asc);
1537 1544
1538 return 1; 1545 return 1;
1539 } 1546 }
1540 1547
1541 int gaim_parse_motd(struct aim_session_t *sess, 1548 int gaim_parse_motd(struct aim_session_t *sess,