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.
$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
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
#include "ipc.h"
#include "citadel_decls.h"
#include "tools.h"
+#include "rooms.h"
+#include "messages.h"
#ifndef HAVE_SNPRINTF
#include "snprintf.h"
#endif
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]);
}
}
}
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);
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
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
+
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(),
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);
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) {
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);