13 struct serv_info serv_info;
16 * get info about the server we've connected to
18 void get_serv_info(char *browser_host)
23 serv_printf("IDEN %d|%d|%d|%s|%s",
38 while (serv_gets(buf), strcmp(buf, "000")) {
41 serv_info.serv_pid = atoi(buf);
44 strcpy(serv_info.serv_nodename, buf);
47 strcpy(serv_info.serv_humannode, buf);
50 strcpy(serv_info.serv_fqdn, buf);
53 strcpy(serv_info.serv_software, buf);
56 serv_info.serv_rev_level = atoi(buf);
59 strcpy(serv_info.serv_bbs_city, buf);
62 strcpy(serv_info.serv_sysadm, buf);
65 strcpy(serv_info.serv_moreprompt, buf);
75 * Function to spit out Citadel variformat text in HTML
76 * If fp is non-null, it is considered to be the file handle to read the
77 * text from. Otherwise, text is read from the server.
90 if (fgets(buf, 256, fp) == NULL)
92 buf[strlen(buf) - 1] = 0;
94 if (!strcmp(buf, "000")) {
100 if ((intext == 1) && (isspace(buf[0]))) {
105 /* Quoted text should be displayed in italics and in a
106 * different colour. This code understands both Citadel/UX
107 * style " >" quotes and FordBoard-style " :-)" quotes.
110 ((!strncmp(buf, " >", 2)) || (!strncmp(buf, " :-)", 4)))) {
111 wprintf("<FONT COLOR=\"000044\"><I>");
113 } else if ((bq == 1) &&
114 (strncmp(buf, " >", 2)) && (strncmp(buf, " :-)", 4))) {
115 wprintf("</FONT></I>");
118 /* Activate embedded URL's */
132 * transmit message text (in memory) to the server
134 void text_to_server(char *ptr)
142 while (ptr[pos] != 0) {
145 while (isspace(buf[strlen(buf) - 1]))
146 buf[strlen(buf) - 1] = 0;
153 if ((ch == 32) && (strlen(buf) > 200)) {
158 if (strlen(buf) > 250) {
173 * translate server message output to text
174 * (used for editing room info files and such)
176 void server_to_text()
182 while (serv_gets(buf), strcmp(buf, "000")) {
183 if ((buf[0] == 32) && (count > 0)) {