11 struct serv_info serv_info;
14 * get info about the server we've connected to
16 void get_serv_info(void) {
20 serv_printf("IDEN %d|%d|%d|%s|%s",
25 "" /* FIX find out where the user is */
31 if (buf[0]!='1') return;
34 while(serv_gets(buf), strcmp(buf,"000")) {
36 case 0: serv_info.serv_pid = atoi(buf);
38 case 1: strcpy(serv_info.serv_nodename,buf);
40 case 2: strcpy(serv_info.serv_humannode,buf);
42 case 3: strcpy(serv_info.serv_fqdn,buf);
44 case 4: strcpy(serv_info.serv_software,buf);
46 case 5: serv_info.serv_rev_level = atoi(buf);
48 case 6: strcpy(serv_info.serv_bbs_city,buf);
50 case 7: strcpy(serv_info.serv_sysadm,buf);
52 case 9: strcpy(serv_info.serv_moreprompt,buf);
62 * Function to spit out Citadel variformat text in HTML
63 * If fp is non-null, it is considered to be the file handle to read the
64 * text from. Otherwise, text is read from the server.
74 if (fp==NULL) serv_gets(buf);
76 if (fgets(buf,256,fp)==NULL) strcpy(buf,"000");
77 buf[strlen(buf)-1] = 0;
79 if (!strcmp(buf,"000")) {
80 if (bq==1) wprintf("</I>");
84 if ( (intext==1) && (isspace(buf[0])) ) {
89 /* Quoted text should be displayed in italics and in a
90 * different colour. This code understands both Citadel/UX
91 * style " >" quotes and FordBoard-style " :-)" quotes.
94 ((!strncmp(buf," >",2))||(!strncmp(buf," :-)",4)))) {
95 wprintf("<FONT COLOR=\"000044\"><I>");
99 (strncmp(buf," >",2))&&(strncmp(buf," :-)",4))) {
100 wprintf("</FONT></I>");
104 /* Activate embedded URL's */