]> code.citadel.org Git - citadel.git/commitdiff
* Added "create room"
authorArt Cancro <ajc@citadel.org>
Sun, 27 Dec 1998 04:28:38 +0000 (04:28 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 27 Dec 1998 04:28:38 +0000 (04:28 +0000)
webcit/ChangeLog
webcit/child.h
webcit/roomops.c
webcit/webcit.c

index 61091f4e8b41c4a271410a40087ac9cc957ec6af..1fcdd4b8f1900441b8bf74a007b83b3eecad3d6c 100644 (file)
@@ -1,6 +1,7 @@
 Sat Dec 26 23:12:47 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Changed the "auto read new" functionality from a meta refresh tag
          to an "onload" directive (the former was causing graphics problems)
+       * Added "create room"
 
 Tue Dec 22 22:35:50 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Got the Zap and List-Zapped commands working
index 4d70a89ffb934ba1e0bd3171aa1a6480cdff2100..096f1dcb0d57829b5b76c031188812072c8068b3 100644 (file)
@@ -59,3 +59,5 @@ void zapped_list(void);
 void display_zap(void);
 void zap(void);
 void display_error(char *errormessage);
+void display_entroom(void);
+void entroom(void);
index 74759e5e671697152645b90f513bb8f46bf0715c..88ee21b6840440a4fc53ce5c84bca4a2b81dc1be 100644 (file)
@@ -699,17 +699,20 @@ int editroom(void) {
 /*
  * display the form for entering a new room
  */
-int display_entroom(void) {
+void display_entroom(void) {
        char buf[256];
 
        serv_puts("CRE8 0");
        serv_gets(buf);
        
        if (buf[0]!='2') {
-               wprintf("<EM>%s</EM><HR>\n",&buf[4]);
-               return(0);
+               display_error(&buf[4]);
+               return;
                }
 
+        printf("HTTP/1.0 200 OK\n");
+        output_headers(1);
+
         wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=000077><TR><TD>");
         wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
         wprintf("<B>Enter (create) a new room</B>\n");
@@ -739,8 +742,8 @@ int display_entroom(void) {
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
        wprintf("</CENTER>\n");
-       wprintf("</FORM>\n");
-       return(1);
+       wprintf("</FORM></HTML>\n");
+       wDumpContent();
        }
 
 
@@ -748,7 +751,7 @@ int display_entroom(void) {
 /*
  * enter a new room
  */
-int entroom(void) {
+void entroom(void) {
        char buf[256];
        char er_name[20];
        char er_type[20];
@@ -756,8 +759,8 @@ int entroom(void) {
        int er_num_type;
 
        if (strcmp(bstr("sc"),"OK")) {
-               wprintf("<EM>Changes have <STRONG>not</STRONG> been saved.</EM><BR>");
-               return(0);
+               display_error("Cancelled.  No new room was created.");
+               return;
                }
        
        strcpy(er_name,bstr("er_name"));
@@ -773,11 +776,10 @@ int entroom(void) {
        serv_puts(buf);
        serv_gets(buf);
        if (buf[0]!='2') {
-               wprintf("<EM>%s</EM><HR>\n",&buf[4]);
-               return(display_editroom());
+               display_error(&buf[4]);
+               return;
                }
-       gotoroom(er_name,0);
-       return(0);
+       gotoroom(er_name, 1);
        }
 
 
index 706df8ab600d5710a1e496955dcdf7a03c752f17..187fc884ac245047cd3ebff699a89d6c5973b8db 100644 (file)
@@ -708,6 +708,14 @@ fclose(fp);
                zap();
                }
 
+       else if (!strcasecmp(action, "display_entroom")) {
+               display_entroom();
+               }
+
+       else if (!strcasecmp(action, "entroom")) {
+               entroom();
+               }
+
        /* When all else fails... */
        else {
                printf("HTTP/1.0 200 OK\n");