From e5cab9e4a83fe21ceb1cefb4754d34e7090772dd Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 17 Mar 2000 16:26:58 +0000 Subject: [PATCH] * Set up a private "Sent/Received Pages" room for each user --- citadel/ChangeLog | 4 +- citadel/network/mail.sysinfo | 212 +++++++++++++++++------------------ citadel/serv_chat.c | 55 ++++++++- citadel/serv_chat.h | 5 + citadel/sysconfig.h | 1 + 5 files changed, 166 insertions(+), 111 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 680521d00..b720e40fd 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 1.491 2000/03/17 16:26:57 ajc + * Set up a private "Sent/Received Pages" room for each user + Revision 1.490 2000/03/17 04:11:24 ajc * Moved bio-related commands out to a loadable module @@ -1753,4 +1756,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/network/mail.sysinfo b/citadel/network/mail.sysinfo index 7905a6eec..c18500367 100644 --- a/citadel/network/mail.sysinfo +++ b/citadel/network/mail.sysinfo @@ -1,72 +1,70 @@ -future +ctestsys use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode The Future BBS -lastcontact 952979823 Mon Mar 13 15:37:03 2000 +phonenum US 612 470 9635 +gdom MN +humannode C-86 Test System +lastcontact 953174223 Wed Mar 15 21:37:03 2000 -catchat +bccs use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode 'Cat Chat -lastcontact 952138915 Fri Mar 3 22:01:55 2000 +phonenum netproc[7145]: Adding non-neighbor system to map +gdom or system to map +humannode BCCS +lastcontact 953246224 Thu Mar 16 17:37:04 2000 -rundale -use uncnsrd -phonenum US 609 854 9135 -gdom NJ -humannode Rundale -lastcontact 952138909 Fri Mar 3 22:01:49 2000 +internet +uum %s +humannode Internet Gateway +lastcontact 953307423 Fri Mar 17 10:37:03 2000 -jacs -use uncnsrd -phonenum US6093461224 -gdom NJ -humannode JACS -lastcontact 952839428 Sun Mar 12 00:37:08 2000 +uncnsrd +bin Mail +phonenum US 914 244 3252 +humannode Uncensored +lastcontact 953282223 Fri Mar 17 03:37:03 2000 -dogpound2 -use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode Dog Pound BBS II -lastcontact 952958224 Mon Mar 13 09:37:04 2000 +test +bin Mail -sbn -use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode Super BBS Network -lastcontact 952138908 Fri Mar 3 22:01:48 2000 +tux +bin Mail +phonenum US 800 555 1212 +humannode My System +lastcontact 951540103 Fri Feb 25 23:41:43 2000 -feathers +tesseract +bin Mail +phonenum US 800 555 1212 +humannode Tesseract Project +lastcontact 953307423 Fri Mar 17 10:37:03 2000 + +pixel use uncnsrd -phonenum CA (604) 589-8539 -gdom BC -humannode Feathers & Furballs -lastcontact 952925823 Mon Mar 13 00:37:03 2000 +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode PixelBBS +lastcontact 953271423 Fri Mar 17 00:37:03 2000 -charis +barbaria use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode MascotSpeak -lastcontact 952138904 Fri Mar 3 22:01:44 2000 +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode Barbaria +lastcontact 952138915 Fri Mar 3 22:01:55 2000 -gateway +haven use uncnsrd -phonenum US (609) 931-3014 -gdom NJ -humannode Gateway -lastcontact 952138913 Fri Mar 3 22:01:53 2000 +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode Haven BBS +lastcontact 952879023 Sun Mar 12 11:37:03 2000 -amigazon +mnmensa use uncnsrd -phonenum US (609) 953 8159 -gdom NJ -humannode The Amiga Zone -lastcontact 952720625 Fri Mar 10 15:37:05 2000 +phonenum US (612) 757-7307 +gdom MN +humannode MN-Mensa +lastcontact 952138905 Fri Mar 3 22:01:45 2000 cbbs use uncnsrd @@ -75,71 +73,73 @@ gdom Cinci humannode The CBBS lastcontact 952138903 Fri Mar 3 22:01:43 2000 -mnmensa +amigazon use uncnsrd -phonenum US (612) 757-7307 -gdom MN -humannode MN-Mensa -lastcontact 952138905 Fri Mar 3 22:01:45 2000 +phonenum US (609) 953 8159 +gdom NJ +humannode The Amiga Zone +lastcontact 952720625 Fri Mar 10 15:37:05 2000 -haven +gateway use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode Haven BBS -lastcontact 952879023 Sun Mar 12 11:37:03 2000 +phonenum US (609) 931-3014 +gdom NJ +humannode Gateway +lastcontact 952138913 Fri Mar 3 22:01:53 2000 -barbaria +charis use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode Barbaria -lastcontact 952138915 Fri Mar 3 22:01:55 2000 +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode MascotSpeak +lastcontact 952138904 Fri Mar 3 22:01:44 2000 -pixel +feathers use uncnsrd -phonenum netproc[4026]: Adding non-neighbor system to map -gdom or system to map -humannode PixelBBS -lastcontact 952904223 Sun Mar 12 18:37:03 2000 - -tesseract -bin Mail -phonenum US 800 555 1212 -humannode Tesseract Project -lastcontact 953138227 Wed Mar 15 11:37:07 2000 +phonenum CA (604) 589-8539 +gdom BC +humannode Feathers & Furballs +lastcontact 952925823 Mon Mar 13 00:37:03 2000 -tux -bin Mail -phonenum US 800 555 1212 -humannode My System -lastcontact 951540103 Fri Feb 25 23:41:43 2000 +sbn +use uncnsrd +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode Super BBS Network +lastcontact 952138908 Fri Mar 3 22:01:48 2000 -test -bin Mail +dogpound2 +use uncnsrd +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode Dog Pound BBS II +lastcontact 953217423 Thu Mar 16 09:37:03 2000 -uncnsrd -bin Mail -phonenum US 914 244 3252 -humannode Uncensored -lastcontact 953087823 Tue Mar 14 21:37:03 2000 +jacs +use uncnsrd +phonenum US6093461224 +gdom NJ +humannode JACS +lastcontact 952839428 Sun Mar 12 00:37:08 2000 -internet -uum %s -humannode Internet Gateway -lastcontact 953138227 Wed Mar 15 11:37:07 2000 +rundale +use uncnsrd +phonenum US 609 854 9135 +gdom NJ +humannode Rundale +lastcontact 952138909 Fri Mar 3 22:01:49 2000 -bccs +catchat use uncnsrd -phonenum netproc[7145]: Adding non-neighbor system to map -gdom or system to map -humannode BCCS -lastcontact 952943824 Mon Mar 13 05:37:04 2000 +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode 'Cat Chat +lastcontact 952138915 Fri Mar 3 22:01:55 2000 -ctestsys +future use uncnsrd -phonenum US 612 470 9635 -gdom MN -humannode C-86 Test System -lastcontact 953102223 Wed Mar 15 01:37:03 2000 +phonenum netproc[4026]: Adding non-neighbor system to map +gdom or system to map +humannode The Future BBS +lastcontact 952979823 Mon Mar 13 15:37:03 2000 diff --git a/citadel/serv_chat.c b/citadel/serv_chat.c index 91ba6f9e7..d1b4db02a 100644 --- a/citadel/serv_chat.c +++ b/citadel/serv_chat.c @@ -30,6 +30,8 @@ #include "dynloader.h" #include "tools.h" #include "msgbase.h" +#include "user_ops.h" +#include "room_ops.h" struct ChatLine *ChatQueue = NULL; int ChatLastMsg = 0; @@ -453,12 +455,20 @@ void cmd_gexp(char *argbuf) { */ int send_express_message(char *lun, char *x_user, char *x_msg) { - int message_sent = 0; + int message_sent = 0; /* number of successful sends */ + struct CitContext *ccptr; struct ExpressMessage *newmsg, *findend; char *un; size_t msglen = 0; - int do_send = 0; + int do_send = 0; /* set to 1 to actually page, not + * just check to see if we can. + */ + struct savelist *sl = NULL; /* list of rooms to save this page */ + struct savelist *sptr; + struct CtdlMessage *logmsg; + char roomname[ROOMNAMELEN]; + long msgnum; if (strlen(x_msg) > 0) { msglen = strlen(x_msg) + 4; @@ -498,6 +508,16 @@ int send_express_message(char *lun, char *x_user, char *x_msg) findend = findend->next; findend->next = newmsg; } + + /* and log it ... */ + if (ccptr != CC) { + sptr = (struct savelist *) + malloc(sizeof(struct savelist)); + sptr->next = sl; + MailboxName(sptr->roomname, + &ccptr->usersupp, PAGELOGROOM); + sl = sptr; + } } ++message_sent; } @@ -505,8 +525,35 @@ int send_express_message(char *lun, char *x_user, char *x_msg) end_critical_section(S_SESSION_TABLE); /* Log the page to disk if configured to do so */ - if ((strlen(config.c_logpages) > 0) && (do_send) ) { - quickie_message(lun, x_user, config.c_logpages, x_msg); + if ( (do_send) && (message_sent) ) { + + logmsg = mallok(sizeof(struct CtdlMessage)); + memset(logmsg, 0, sizeof(struct CtdlMessage)); + logmsg->cm_magic = CTDLMESSAGE_MAGIC; + logmsg->cm_anon_type = MES_NORMAL; + logmsg->cm_format_type = 0; + logmsg->cm_fields['A'] = strdoop(lun); + logmsg->cm_fields['N'] = strdoop(NODENAME); + logmsg->cm_fields['O'] = strdoop(PAGELOGROOM); + logmsg->cm_fields['R'] = strdoop(x_user); + logmsg->cm_fields['M'] = strdoop(x_msg); + + MailboxName(roomname, &CC->usersupp, PAGELOGROOM); + create_room(roomname, 4, "", 0); + msgnum = CtdlSaveMsg(logmsg, "", roomname, MES_LOCAL); + if (strlen(config.c_logpages) > 0) { + create_room(config.c_logpages, 3, "", 0); + CtdlSaveMsgPointerInRoom(config.c_logpages, msgnum, 0); + } + while (sl != NULL) { + create_room(sl->roomname, 4, "", 0); + CtdlSaveMsgPointerInRoom(sl->roomname, msgnum, 0); + sptr = sl->next; + phree(sl); + sl = sptr; + } + + CtdlFreeMessage(logmsg); } return (message_sent); diff --git a/citadel/serv_chat.h b/citadel/serv_chat.h index 18222f5dc..d5e9d34cd 100644 --- a/citadel/serv_chat.h +++ b/citadel/serv_chat.h @@ -9,3 +9,8 @@ void cmd_sexp (char *argbuf); void delete_express_messages(void); void cmd_gexp(char *); int send_express_message(char *, char *, char *); + +struct savelist { + struct savelist *next; + char roomname[ROOMNAMELEN]; +}; diff --git a/citadel/sysconfig.h b/citadel/sysconfig.h index 6a772177a..dd445ce9d 100644 --- a/citadel/sysconfig.h +++ b/citadel/sysconfig.h @@ -96,5 +96,6 @@ #define MAILROOM "Mail" #define AIDEROOM "Aide" #define USERCONFIGROOM "My Citadel Config" +#define PAGELOGROOM "Sent/Received Pages" #define SYSCONFIGROOM "Local System Configuration" #define SMTP_SPOOLOUT_ROOM "__CitadelSMTPspoolout__" -- 2.30.2