]> code.citadel.org Git - citadel.git/blobdiff - webcit/roomops.c
! fix bug with gotoroom introduced in the last version. Thanks Matt for pointing...
[citadel.git] / webcit / roomops.c
index 5efd7109ab5d9673373c1bbf007fc009e4f5fb14..4d1414937c27930870c0c73f22a77b6383eafec6 100644 (file)
@@ -755,7 +755,6 @@ void embed_room_banner(char *got, int navbar_style) {
 long gotoroom(const StrBuf *gname)
 {
        StrBuf *Buf;
-       char buf[SIZ];
        static long ls = (-1L);
        long err = 0;
 
@@ -767,13 +766,14 @@ long gotoroom(const StrBuf *gname)
        serv_printf("GOTO %s", ChrPtr(gname));
        StrBuf_ServGetln(Buf);
        if  (GetServerStatus(Buf, &err) != 2) {
-               FreeStrBuf(&Buf);
-               return err;
+               serv_puts("GOTO _BASEROOM_");
+               StrBuf_ServGetln(Buf);
+               if (GetServerStatus(Buf, &err) != 2) {
+                       FreeStrBuf(&Buf);
+                       return err;
+               }
        }
 
-       serv_puts("GOTO _BASEROOM_");
-       serv_getln(buf, sizeof buf);
-
        if (WC->wc_roomname == NULL)
                WC->wc_roomname = NewStrBuf();
        else