* Modified roomops.c to give users the ability to pick a floor at room
authorAndru Luvisi <cough@uncensored.citadel.org>
Sun, 1 Apr 2001 22:13:37 +0000 (22:13 +0000)
committerAndru Luvisi <cough@uncensored.citadel.org>
Sun, 1 Apr 2001 22:13:37 +0000 (22:13 +0000)
  creation time.

webcit/ChangeLog
webcit/roomops.c

index 4799b24120bdc8889e553d98a34290db53246209..e1bc9f947530f5bac384b3bf5251b93eb457e3dd 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 213.5  2001/04/01 22:13:37  cough
+* Modified roomops.c to give users the ability to pick a floor at room
+  creation time.
+
 Revision 213.4  2001/02/15 01:21:55  ajc
 * Applied a patch submitted by "cough" to add who-knows-room and
   invite/kickout functionality.
index 2847d18ad21807b5bf0ed80f488e24615318080a..f3d5d4eddb365bdde3295112e1ede2c81dbf45c1 100644 (file)
@@ -1000,6 +1000,7 @@ void display_whok(void)
  */
 void display_entroom(void)
 {
+       int i;
        char buf[256];
 
        serv_puts("CRE8 0");
@@ -1035,6 +1036,21 @@ void display_entroom(void)
 
        wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"invonly\" ");
        wprintf("> Private - invitation only\n");
+       wprintf("</UL>\n");
+
+        wprintf("<LI>Resides on floor: ");
+        load_floorlist(); 
+        wprintf("<SELECT NAME=\"er_floor\" SIZE=\"1\">\n");
+        for (i = 0; i < 128; ++i)
+                if (strlen(floorlist[i]) > 0) {
+                        wprintf("<OPTION ");
+                        wprintf("VALUE=\"%d\">", i);
+                        escputs(floorlist[i]);
+                        wprintf("</OPTION>\n");
+                }
+        wprintf("</SELECT>\n");                
+       wprintf("</UL>\n");
+
 
        wprintf("<CENTER>\n");
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
@@ -1055,6 +1071,7 @@ void entroom(void)
        char er_name[20];
        char er_type[20];
        char er_password[10];
+       int er_floor;
        int er_num_type;
 
        if (strcmp(bstr("sc"), "OK")) {
@@ -1064,6 +1081,7 @@ void entroom(void)
        strcpy(er_name, bstr("er_name"));
        strcpy(er_type, bstr("type"));
        strcpy(er_password, bstr("er_password"));
+       er_floor = atoi(bstr("er_floor"));
 
        er_num_type = 0;
        if (!strcmp(er_type, "guessname"))
@@ -1073,7 +1091,8 @@ void entroom(void)
        if (!strcmp(er_type, "invonly"))
                er_num_type = 3;
 
-       sprintf(buf, "CRE8 1|%s|%d|%s", er_name, er_num_type, er_password);
+       sprintf(buf, "CRE8 1|%s|%d|%s|%d", 
+               er_name, er_num_type, er_password, er_floor);
        serv_puts(buf);
        serv_gets(buf);
        if (buf[0] != '2') {