X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=2cba1abb615945ff4a6e9f2ba315958e2adf7124;hb=a64bfc27dd3a05603efa1a729cc1ae4922e7ed17;hp=0777eefe33d619c4131500dfc54c0beffd06a084;hpb=e75e8817291f1504a58c70d721075d82293c9e72;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index 0777eefe3..2cba1abb6 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -5,17 +5,11 @@ * * This program is open source software. You can redistribute it and/or * modify it under the terms of the GNU General Public License, version 3. - * - * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * - * - * */ #include "webcit.h" @@ -354,20 +348,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); } @@ -1038,6 +1042,9 @@ void netedit(void) { StrBuf *TmpBuf; int Done; + if (havebstr("force_room")) { + gotoroom(sbstr("force_room")); + } /*/ TODO: do line dynamic! */ if (havebstr("line_pop3host")) { strcpy(line, bstr("prefix"));