X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=09534742eeaae5ba09b01b4222c68ef64487d60d;hb=536d754a8941976b3797a2775998ae7de89c19ec;hp=edc09dec0eb1ca2ca74d5508a41471276217283b;hpb=88d78e6b2810ad215f87bc0c2f2ac5447f42af05;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index edc09dec0..09534742e 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -354,20 +354,30 @@ void ParseGoto(folder *room, StrBuf *Line) */ void delete_room(void) { - StrBuf *Line; + StrBuf *Line = NewStrBuf(); + const StrBuf *GoBstr; - serv_puts("KILL 1"); - StrBuf_ServGetln(Line); - if (GetServerStatusMsg(Line, NULL, 1, 2) != 2) { - display_main_menu(); - } else { - StrBuf *Buf; - - FlushRoomlist (); - Buf = NewStrBufPlain(HKEY("_BASEROOM_")); - smart_goto(Buf); - FreeStrBuf(&Buf); + GoBstr = sbstr("go"); + + if (GoBstr != NULL) + { + if (gotoroom(GoBstr) == 200) + { + serv_puts("KILL 1"); + StrBuf_ServGetln(Line); + if (GetServerStatusMsg(Line, NULL, 1, 2) == 2) { + StrBuf *Buf; + + FlushRoomlist (); + Buf = NewStrBufPlain(HKEY("_BASEROOM_")); + smart_goto(Buf); + FreeStrBuf(&Buf); + FreeStrBuf(&Line); + return; + } + } } + display_main_menu(); FreeStrBuf(&Line); }