]> code.citadel.org Git - citadel.git/commitdiff
* Relax restrictions on editing of base rooms. Renaming is not allowed but
authorArt Cancro <ajc@citadel.org>
Sat, 4 Mar 2000 05:29:19 +0000 (05:29 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 4 Mar 2000 05:29:19 +0000 (05:29 +0000)
  all other attributes can be edited.  Closes feature request #21.
* Sending pages from the client now uses the same message editing functions
  as entering messages, allowing edit/abort.  Closes feature request #25.

citadel/ChangeLog
citadel/client_chat.c
citadel/messages.h
citadel/network/mail.sysinfo
citadel/room_ops.c

index da97ff96af2f1107eac9f5bb548ff34a25f6d92e..83a4ac8041cbf97cf0541b64e0672126334af743 100644 (file)
@@ -1,4 +1,10 @@
 $Log$
+Revision 1.476  2000/03/04 05:29:18  ajc
+* Relax restrictions on editing of base rooms.  Renaming is not allowed but
+  all other attributes can be edited.  Closes feature request #21.
+* Sending pages from the client now uses the same message editing functions
+  as entering messages, allowing edit/abort.  Closes feature request #25.
+
 Revision 1.475  2000/03/03 04:50:14  ajc
 * Moved all of the wholist masquerading commands into the serv_rwho module
 
@@ -1685,4 +1691,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Initial CVS import 
-
index 5f6dca53368dceec2af4a119a4f3859cc77f4c8f..97805d157087853e6f11b13d9cd2ec7b96351315 100644 (file)
@@ -30,6 +30,8 @@
 #include "ipc.h"
 #include "citadel_decls.h"
 #include "tools.h"
+#include "rooms.h"
+#include "messages.h"
 #ifndef HAVE_SNPRINTF
 #include "snprintf.h"
 #endif
@@ -244,32 +246,28 @@ void page_user() {
                        return;
                        }
 
-               printf("Type message to send.  Enter a blank line when finished.\n");
-               pagefp = fopen(temp, "w+");
+               if ( make_message(temp, touser, 0, 0, 0) != 0 ) {
+                       printf("No message sent.\n");
+                       return;
+               }
+
+               pagefp = fopen(temp, "r");
                unlink(temp);
-               citedit(pagefp, 0L);
-               fseek(pagefp, 0L, SEEK_END);
-               if ( ftell(pagefp) > 2)  {
-                       rewind(pagefp);
-                       snprintf(buf, sizeof buf, "SEXP %s|-", touser);
-                       serv_puts(buf);
-                       serv_gets(buf);
-                       if (buf[0]=='4') {
-                               strcpy(last_paged, touser);
-                               while (fgets(buf, 256, pagefp) != NULL) {
-                                       buf[strlen(buf)-1] = 0;
-                                       serv_puts(buf);
-                                       }
-                               fclose(pagefp);
-                               serv_puts("000");
-                               printf("Message sent.\n");
-                       }
-                       else {
-                               printf("%s\n", &buf[4]);
-                       }
-               } 
+               snprintf(buf, sizeof buf, "SEXP %s|-", touser);
+               serv_puts(buf);
+               serv_gets(buf);
+               if (buf[0]=='4') {
+                       strcpy(last_paged, touser);
+                       while (fgets(buf, 256, pagefp) != NULL) {
+                               buf[strlen(buf)-1] = 0;
+                               serv_puts(buf);
+                               }
+                       fclose(pagefp);
+                       serv_puts("000");
+                       printf("Message sent.\n");
+               }
                else {
-                       printf("No message sent.\n");
+                       printf("%s\n", &buf[4]);
                }
        }
 }
index 4af8f4286215d642202a5184cd125695fc8fbcd7..aa43c472dbbb8030569b93ee4cbc5d92d69fc82f 100644 (file)
@@ -7,3 +7,8 @@ extern int lines_printed;
 pid_t ka_wait(int *kstatus);
 void list_urls(void);
 void check_message_base(void);
+int make_message(char *filename,       /* temporary file name */
+               char *recipient,        /* NULL if it's not mail */
+               int anon_type,          /* see MES_ types in header file */
+               int format_type,
+               int mode);
index 6e72af00852fb3fb52f48342894f721682c1ca7f..ea3f767926ae5216aee5b0fa1647e8f988043c37 100644 (file)
@@ -1,13 +1,13 @@
 internet
 uum %s
 humannode Internet Gateway
-lastcontact 951540103 Fri Feb 25 23:41:43 2000
+lastcontact 952143243 Fri Mar  3 23:14:03 2000
 
 uncnsrd
 bin Mail
 phonenum US 914 244 3252
 humannode Uncensored
-lastcontact 951189558 Mon Feb 21 22:19:18 2000
+lastcontact 952138915 Fri Mar  3 22:01:55 2000
 
 test
 bin Mail
@@ -18,3 +18,114 @@ phonenum US 800 555 1212
 humannode My System
 lastcontact 951540103 Fri Feb 25 23:41:43 2000
 
+tesseract
+bin Mail
+phonenum US 800 555 1212
+humannode My System
+lastcontact 952143243 Fri Mar  3 23:14:03 2000
+
+pixel
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <tesseract> to map
+gdom or system <tesseract> to map
+humannode PixelBBS
+lastcontact 952138915 Fri Mar  3 22:01:55 2000
+
+barbaria
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <pixel> to map
+gdom or system <pixel> to map
+humannode Barbaria
+lastcontact 952138915 Fri Mar  3 22:01:55 2000
+
+haven
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <barbaria> to map
+gdom or system <barbaria> to map
+humannode Haven BBS
+lastcontact 952138910 Fri Mar  3 22:01:50 2000
+
+mnmensa
+use uncnsrd
+phonenum US (612) 757-7307
+gdom MN
+humannode MN-Mensa
+lastcontact 952138905 Fri Mar  3 22:01:45 2000
+
+cbbs
+use uncnsrd
+phonenum US (513) 939 1645
+gdom Cinci
+humannode The CBBS
+lastcontact 952138903 Fri Mar  3 22:01:43 2000
+
+amigazon
+use uncnsrd
+phonenum US (609) 953 8159
+gdom NJ
+humannode The Amiga Zone
+lastcontact 952138913 Fri Mar  3 22:01:53 2000
+
+gateway
+use uncnsrd
+phonenum US (609) 931-3014
+gdom NJ
+humannode Gateway
+lastcontact 952138913 Fri Mar  3 22:01:53 2000
+
+charis
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <gateway> to map
+gdom or system <gateway> to map
+humannode MascotSpeak
+lastcontact 952138904 Fri Mar  3 22:01:44 2000
+
+feathers
+use uncnsrd
+phonenum CA (604) 589-8539
+gdom BC
+humannode Feathers & Furballs
+lastcontact 952138915 Fri Mar  3 22:01:55 2000
+
+sbn
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <feathers> to map
+gdom or system <feathers> to map
+humannode Super BBS Network
+lastcontact 952138908 Fri Mar  3 22:01:48 2000
+
+dogpound2
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <sbn> to map
+gdom or system <sbn> to map
+humannode Dog Pound BBS II
+lastcontact 952138915 Fri Mar  3 22:01:55 2000
+
+jacs
+use uncnsrd
+phonenum US6093461224
+gdom NJ
+humannode JACS
+lastcontact 952138912 Fri Mar  3 22:01:52 2000
+
+rundale
+use uncnsrd
+phonenum US 609 854 9135
+gdom NJ
+humannode Rundale
+lastcontact 952138909 Fri Mar  3 22:01:49 2000
+
+catchat
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <rundale> to map
+gdom or system <rundale> to map
+humannode 'Cat Chat
+lastcontact 952138915 Fri Mar  3 22:01:55 2000
+
+future
+use uncnsrd
+phonenum netproc[4026]: Adding non-neighbor system <catchat> to map
+gdom or system <catchat> to map
+humannode The Future BBS
+lastcontact 952138911 Fri Mar  3 22:01:51 2000
+
index cf88f1841b12df3ebb3889b376284ee3b8b020d8..d512f539aa0eea626e73f8e55e614fc954c4631f 100644 (file)
@@ -892,10 +892,14 @@ void cmd_getr(void)
                        ERROR + HIGHER_ACCESS_REQUIRED);
                return;
        }
+
+       /********
        if (is_noneditable(&CC->quickroom)) {
                cprintf("%d Can't edit this room.\n", ERROR + NOT_HERE);
                return;
        }
+       ************/
+
        getroom(&CC->quickroom, CC->quickroom.QRname);
        cprintf("%d%c%s|%s|%s|%d|%d|%d\n",
                OK, CtdlCheckExpress(),
@@ -918,6 +922,7 @@ void cmd_setr(char *args)
        char old_name[ROOMNAMELEN];
        int old_floor;
        int new_order = 0;
+       int ne = 0;
 
        if (!(CC->logged_in)) {
                cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
@@ -928,10 +933,19 @@ void cmd_setr(char *args)
                        ERROR + HIGHER_ACCESS_REQUIRED);
                return;
        }
+
+
        if (is_noneditable(&CC->quickroom)) {
+               ne = 1;
+       }
+
+       /***
                cprintf("%d Can't edit this room.\n", ERROR + NOT_HERE);
                return;
        }
+       ***/
+
+
        if (num_parms(args) >= 6) {
                getfloor(&flbuf, extract_int(args, 5));
                if ((flbuf.f_flags & F_INUSE) == 0) {
@@ -948,10 +962,16 @@ void cmd_setr(char *args)
                        new_order = 127;
        }
        lgetroom(&CC->quickroom, CC->quickroom.QRname);
+
+       /* Non-editable base rooms can't be renamed */
        strcpy(old_name, CC->quickroom.QRname);
-       extract(buf, args, 0);
-       buf[ROOMNAMELEN] = 0;
-       safestrncpy(CC->quickroom.QRname, buf, sizeof CC->quickroom.QRname);
+       if (!ne) {
+               extract(buf, args, 0);
+               buf[ROOMNAMELEN] = 0;
+               safestrncpy(CC->quickroom.QRname, buf,
+                       sizeof CC->quickroom.QRname);
+       }
+
        extract(buf, args, 1);
        buf[10] = 0;
        safestrncpy(CC->quickroom.QRpasswd, buf, sizeof CC->quickroom.QRpasswd);