* if the config room has another view than VIEW_BBS, set it. Else it might stop us...
authorWilfried Göesgens <willi@citadel.org>
Sat, 16 Jan 2010 15:26:33 +0000 (15:26 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 16 Jan 2010 15:26:33 +0000 (15:26 +0000)
webcit/preferences.c

index aeca0028a1ee73567dd0e473e72d48f909d9a555..a00c732936f6f5fee7223ca6ef167aa21433b142 100644 (file)
@@ -350,8 +350,21 @@ void save_preferences(void)
 
                return; /* oh well. */
        }
-//void do_change_view(int newview) {
 
+       /* make shure the config room has the right type, else it might reject our config */
+       if (Room.view != VIEW_BBS) {
+               serv_printf("VIEW %d", VIEW_BBS);
+               StrBuf_ServGetln(ReadBuf);
+               if (GetServerStatus(ReadBuf, NULL) != 2) {
+                       /* UPS? */
+               }
+               else if (goto_config_room(ReadBuf, &Room) != 0) {
+                       FreeStrBuf(&ReadBuf);
+                       FlushFolder(&Room);
+                       
+                       return; /* oh well. */
+               }
+       }
 
        serv_puts("MSGS ALL|0|1");
        StrBuf_ServGetln(ReadBuf);