+/*
+ * delete the actual floor
+ */
+void delete_floor(void) {
+ int floornum;
+ StrBuf *Buf;
+ const char *Err;
+
+ floornum = ibstr("floornum");
+ Buf = NewStrBuf();
+ serv_printf("KFLR %d|1", floornum);
+
+ StrBufTCP_read_line(Buf, &WC->serv_sock, 0, &Err);
+
+ if (GetServerStatus(Buf, NULL) == 2) {
+ StrBufPlain(Buf, _("Floor has been deleted."),-1);
+ }
+ else {
+ StrBufCutLeft(Buf, 4);
+ }
+ AppendImportantMessage (SKEY(Buf));
+
+ FlushRoomlist();
+ http_transmit_thing(ChrPtr(do_template("floors", NULL)), 0);
+ FreeStrBuf(&Buf);
+}
+
+/*
+ * start creating a new floor
+ */
+void create_floor(void) {
+ StrBuf *Buf;
+ const char *Err;
+
+ Buf = NewStrBuf();
+ serv_printf("CFLR %s|1", bstr("floorname"));
+ StrBufTCP_read_line(Buf, &WC->serv_sock, 0, &Err);
+
+ if (GetServerStatus(Buf, NULL) == 2) {
+ StrBufPlain(Buf, _("New floor has been created."),-1);
+ }
+ else {
+ StrBufCutLeft(Buf, 4);
+ }
+ AppendImportantMessage (SKEY(Buf));
+ FlushRoomlist();
+ http_transmit_thing(ChrPtr(do_template("floors", NULL)), 0);
+ FreeStrBuf(&Buf);
+}
+
+
+/*
+ * rename this floor
+ */
+void rename_floor(void) {
+ StrBuf *Buf;
+
+ Buf = NewStrBuf();
+ FlushRoomlist();
+
+ serv_printf("EFLR %d|%s", ibstr("floornum"), bstr("floorname"));
+ StrBuf_ServGetln(Buf);
+
+ StrBufCutLeft(Buf, 4);
+ AppendImportantMessage (SKEY(Buf));
+
+ http_transmit_thing(ChrPtr(do_template("floors", NULL)), 0);
+ FreeStrBuf(&Buf);
+}
+
+