/*
- * generic routine to take the session to a new room
+ * back end routine to take the session to a new room
*
- * display_name values: 0 = goto only
- * 1 = goto and display
- * 2 = display only
*/
-void gotoroom(char *gname, int display_name)
+void gotoroom(char *gname)
{
char buf[SIZ];
static long ls = (-1L);
+ /* store ungoto information */
+ strcpy(WC->ugname, WC->wc_roomname);
+ WC->uglsn = ls;
- if (display_name) {
- output_headers(0);
- wprintf("Pragma: no-cache\n");
- wprintf("Cache-Control: no-store\n");
-
- wprintf("<HTML><HEAD>\n"
- "<META HTTP-EQUIV=\"refresh\" CONTENT=\"500363689;\">\n"
- "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n"
- "<META HTTP-EQUIV=\"expired\" CONTENT=\"28-May-1971 18:10:00 GMT\">\n"
- "<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\">\n"
- "</HEAD>\n");
- do_template("background");
- }
- if (display_name != 2) {
- /* store ungoto information */
- strcpy(WC->ugname, WC->wc_roomname);
- WC->uglsn = ls;
- }
/* move to the new room */
serv_printf("GOTO %s", gname);
serv_gets(buf);
serv_gets(buf);
}
if (buf[0] != '2') {
- if (display_name) {
- wprintf("<EM>%s</EM><BR>\n", &buf[4]);
- wDumpContent(1);
- }
return;
}
extract(WC->wc_roomname, &buf[4], 0);
remove_march(WC->wc_roomname);
if (!strcasecmp(gname, "_BASEROOM_"))
remove_march(gname);
-
- /* Display the room banner */
- if (display_name) {
- embed_room_banner(buf);
- wDumpContent(1);
- }
}
void smart_goto(char *next_room) {
- gotoroom(next_room, 0);
+ gotoroom(next_room);
readloop("readnew");
}
display_editroom();
return;
}
- gotoroom(er_name, 0);
+ gotoroom(er_name);
if (strlen(er_roomaide) > 0) {
sprintf(buf, "SETA %s", er_roomaide);
return;
}
}
- gotoroom(er_name, 0);
+ gotoroom(er_name);
strcpy(WC->ImportantMessage, "Your changes have been saved.");
display_editroom();
return;
char er_password[SIZ];
int er_floor;
int er_num_type;
+ int er_view;
if (strcmp(bstr("sc"), "OK")) {
strcpy(WC->ImportantMessage,
strcpy(er_type, bstr("type"));
strcpy(er_password, bstr("er_password"));
er_floor = atoi(bstr("er_floor"));
+ er_view = atoi(bstr("er_view"));
er_num_type = 0;
if (!strcmp(er_type, "guessname"))
if (!strcmp(er_type, "personal"))
er_num_type = 4;
- sprintf(buf, "CRE8 1|%s|%d|%s|%d",
- er_name, er_num_type, er_password, er_floor);
+ sprintf(buf, "CRE8 1|%s|%d|%s|%d|%d|%d",
+ er_name, er_num_type, er_password, er_floor, 0, er_view);
serv_puts(buf);
serv_gets(buf);
if (buf[0] != '2') {
display_main_menu();
return;
}
- gotoroom(er_name, 0);
- er_set_default_view(atoi(bstr("er_view"))); /* Set default view */
- do_change_view(atoi(bstr("er_view"))); /* Now go there */
+ gotoroom(er_name);
+ do_change_view(er_view); /* Now go there */
}
serv_printf("VIEW %d", newview);
serv_gets(buf);
+ WC->wc_view = newview;
smart_goto(WC->wc_roomname);
}
#define DEVELOPER_ID 0
#define CLIENT_ID 4
#define CLIENT_VERSION 523 /* This version of WebCit */
-#define MINIMUM_CIT_VERSION 623 /* min required Citadel vers */
+#define MINIMUM_CIT_VERSION 626 /* min required Citadel vers */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define LB (1) /* Internal escape chars */
void save_edit(char *description, char *enter_cmd, int regoto);
void display_edit(char *description, char *check_cmd,
char *read_cmd, char *save_cmd, int headers_type);
-void gotoroom(char *gname, int display_name);
+void gotoroom(char *gname);
void confirm_delete_room(void);
void delete_room(void);
void validate(void);