* Replaced _most_ gotoroom() calls with smart_goto(), a version
authorArt Cancro <ajc@citadel.org>
Tue, 11 May 1999 03:10:20 +0000 (03:10 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 11 May 1999 03:10:20 +0000 (03:10 +0000)
          which can differentiate the needs of frames and noframes modes

webcit/ChangeLog
webcit/child.h
webcit/roomops.c
webcit/sysmsgs.c
webcit/webcit.c

index fcf761af5b378fd02545b1ad2eee1d3659c7358d..fb1d0fe6773950ff94784c2d6812873a160da0e2 100644 (file)
@@ -1,3 +1,7 @@
+Mon May 10 23:09:34 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+       * Replaced _most_ gotoroom() calls with smart_goto(), a version
+         which can differentiate the needs of frames and noframes modes
+
 Sat May  8 01:07:06 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * webserver.c: added "-t" option to send traces somewhere else
 
index ccdcd415c65dfc0ed26a51141ccaedb95cc9b703..9a557941dd0791377ebb40bd4c7faede38a6f9c9 100644 (file)
@@ -103,3 +103,4 @@ void do_generic(void);
 int browser_braindamage_check(char *);
 void display_menubar(int);
 void embed_room_banner(char *);
+void smart_goto(char *);
index 1ea8b5e833dcc45f2293cabacfbfbf874445ee24..2927ed651b4edf2b4fbdafa51e2840b5d753590c 100644 (file)
@@ -115,7 +115,9 @@ void room_tree_list(struct roomlisting *rp)
 
        wprintf("<A HREF=\"/dotgoto&room=");
        urlescputs(rmname);
-       wprintf("\" TARGET=\"top\">");
+       wprintf("\"");
+       if (!noframes) wprintf("TARGET=\"top\"");
+       wprintf(">");
        escputs1(rmname, 1);
        if ((f & QR_DIRECTORY) && (f & QR_NETWORK))
                wprintf("}");
@@ -536,6 +538,12 @@ void gotonext(void)
                strcpy(next_room, "_BASEROOM_");
        }
 
+
+       smart_goto(next_room);
+}
+
+
+void smart_goto(char *next_room) {
        /* In noframes mode, we goto the room silently, then do a
         * read-new-messages which causes the banner to show up anyway.
         */
@@ -578,13 +586,13 @@ void ungoto(void)
        char buf[256];
 
        if (!strcmp(ugname, "")) {
-               gotoroom(wc_roomname, 1);
+               smart_goto(wc_roomname);
                return;
        }
        serv_printf("GOTO %s", ugname);
        serv_gets(buf);
        if (buf[0] != '2') {
-               gotoroom(wc_roomname, 1);
+               smart_goto(wc_roomname);
                return;
        }
        if (uglsn >= 0L) {
@@ -593,7 +601,7 @@ void ungoto(void)
        }
        strcpy(buf, ugname);
        strcpy(ugname, "");
-       gotoroom(buf, 1);
+       smart_goto(buf);
 }
 
 /*
@@ -908,7 +916,7 @@ void editroom(void)
                        return;
                }
        }
-       gotoroom(er_name, 1);
+       smart_goto(er_name);
 }
 
 
@@ -999,7 +1007,7 @@ void entroom(void)
                display_error(&buf[4]);
                return;
        }
-       gotoroom(er_name, 1);
+       smart_goto(er_name);
 }
 
 
@@ -1065,7 +1073,7 @@ void goto_private(void)
        serv_gets(buf);
 
        if (buf[0] == '2') {
-               gotoroom(bstr("gr_name"), 1);
+               smart_goto(bstr("gr_name"));
                return;
        }
        if (!strncmp(buf, "540", 3)) {
@@ -1128,7 +1136,7 @@ void zap(void)
                display_error(&buf[4]);
                return;
        }
-       gotoroom(bstr("_BASEROOM_"), 1);
+       smart_goto(bstr("_BASEROOM_"));
 }
 
 
@@ -1188,6 +1196,6 @@ void delete_room(void)
        if (buf[0] != '2') {
                display_error(&buf[4]);
        } else {
-               gotoroom("_BASEROOM_", 1);
+               smart_goto("_BASEROOM_");
        }
 }
index b17abfc42a43041767052c036e2191c58538214f..5fa17c05b4c5244ea1dd4389fc904e57ab1f2c6c 100644 (file)
@@ -76,7 +76,7 @@ void save_edit(char *description, char *enter_cmd, int regoto)
        serv_puts("000");
 
        if (regoto) {
-               gotoroom(wc_roomname, 1);
+               smart_goto(wc_roomname);
        } else {
                printf("HTTP/1.0 200 OK\n");
                output_headers(1);
index 82eaa9541198bcd068bff546c59b4f5fbadf6a32..343546aee35e956a786ab7a94eec24b7a851e2c3 100644 (file)
@@ -757,7 +757,7 @@ void session_loop(char *browser_host)
                ungoto();
        } else if (!strcasecmp(action, "dotgoto")) {
                slrp_highest();
-               gotoroom(bstr("room"), 1);
+               smart_goto(bstr("room"));
        } else if (!strcasecmp(action, "termquit")) {
                do_logout();
        } else if (!strcasecmp(action, "readnew")) {