$Log$
+ Revision 591.19 2002/05/12 22:57:04 ajc
+ * Removed the unfinished moderation system.
+ * CtdlForEachMessage() - only fetch metadata when hunting for messages with
+ a specified Content-type. Serious performance boost.
+
Revision 591.18 2002/05/05 17:33:09 error
* screen.c: fix lack of beeps in curses mode
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
modules/libpas2.la \
modules/libinetcfg.la \
modules/librwho.la \
- modules/libmoderate.la \
modules/libbio.la \
modules/libexpire.la \
modules/libvandelay.la \
auth.c chkpwd.c html.c vcard.c serv_upgrade.c serv_vandelay.c \
serv_smtp.c serv_pop3.c internet_addressing.c parsedate.c genstamp.c \
$(DOMAIN) clientsocket.c serv_inetcfg.c serv_rwho.c serv_bio.c \
- serv_moderate.c client_passwords.c imap_misc.c serv_netfilter.c \
+ client_passwords.c imap_misc.c serv_netfilter.c \
serv_imap.c imap_tools.c imap_fetch.c imap_search.c imap_store.c \
serv_network.c serv_pas2.c serv_ical.c md5.c server_main.c
modules/librwho.la: serv_rwho.lo $(LIBTOOL) libcitserver.la
$(LTSHARE) -o librwho.la ../serv_rwho.lo ../libcitserver.la
-modules/libmoderate.la: serv_moderate.lo $(LIBTOOL) libcitserver.la
- $(LTSHARE) -o libmoderate.la ../serv_moderate.lo ../libcitserver.la
-
modules/libbio.la: serv_bio.lo $(LIBTOOL) libcitserver.la
$(LTSHARE) -o libbio.la ../serv_bio.lo ../libcitserver.la
int c_max_workers; /* Upper limit on number of threads */
int c_pop3_port; /* POP3 listener port (usually 110) */
int c_smtp_port; /* SMTP listener port (usually 25) */
- int c_default_filter; /* Default moderation filter level */
+ int c_unused_1; /* Nothin' here anymore... */
int c_aide_zap; /* Are Aides allowed to zap rooms? */
int c_imap_port; /* IMAP listener port (usually 143) */
time_t c_net_freq; /* how often to run the networker */
char fullname[64]; /* Name for Citadel messages & mail */
CIT_UBYTE USscreenwidth; /* Screen width (for textmode users)*/
CIT_UBYTE USscreenheight; /* Screen height(for textmode users)*/
- char moderation_filter; /* Moderation filter level */
};
/*
* get_control - read the control record into memory.
*/
-void get_control(void) {
+void get_control(void)
+{
/* Zero it out. If the control record on disk is missing or short,
* the system functions with all control record fields initialized
fchown(fileno(control_fp), config.c_bbsuid, -1);
memset(&CitControl, 0, sizeof(struct CitControl));
fwrite(&CitControl, sizeof(struct CitControl),
- 1, control_fp);
+ 1, control_fp);
rewind(control_fp);
}
}
rewind(control_fp);
fread(&CitControl, sizeof(struct CitControl), 1, control_fp);
- }
+}
/*
* put_control - write the control record to disk.
*/
-void put_control(void) {
+void put_control(void)
+{
if (control_fp != NULL) {
rewind(control_fp);
- fwrite(&CitControl, sizeof(struct CitControl), 1, control_fp);
+ fwrite(&CitControl, sizeof(struct CitControl), 1,
+ control_fp);
fflush(control_fp);
- }
}
+}
/*
* get_new_message_number() - Obtain a new, unique ID to be used for a message.
*/
-long get_new_message_number(void) {
+long get_new_message_number(void)
+{
begin_critical_section(S_CONTROL);
get_control();
++CitControl.MMhighest;
put_control();
end_critical_section(S_CONTROL);
- return(CitControl.MMhighest);
- }
+ return (CitControl.MMhighest);
+}
/*
* get_new_user_number() - Obtain a new, unique ID to be used for a user.
*/
-long get_new_user_number(void) {
+long get_new_user_number(void)
+{
begin_critical_section(S_CONTROL);
get_control();
++CitControl.MMnextuser;
put_control();
end_critical_section(S_CONTROL);
- return(CitControl.MMnextuser);
- }
+ return (CitControl.MMnextuser);
+}
/*
* get_new_room_number() - Obtain a new, unique ID to be used for a room.
*/
-long get_new_room_number(void) {
+long get_new_room_number(void)
+{
begin_critical_section(S_CONTROL);
get_control();
++CitControl.MMnextroom;
put_control();
end_critical_section(S_CONTROL);
- return(CitControl.MMnextroom);
- }
+ return (CitControl.MMnextroom);
+}
/*
* Get or set global configuration options
*/
-void cmd_conf(char *argbuf) {
+void cmd_conf(char *argbuf)
+{
char cmd[SIZ];
char buf[SIZ];
int a;
cprintf("%d\n", config.c_max_workers);
cprintf("%d\n", config.c_pop3_port);
cprintf("%d\n", config.c_smtp_port);
- cprintf("%d\n", config.c_default_filter);
+ cprintf("0\n"); /* position 25 no longer exists */
cprintf("%d\n", config.c_aide_zap);
cprintf("%d\n", config.c_imap_port);
cprintf("%ld\n", config.c_net_freq);
cprintf("%d\n", config.c_disable_newu);
cprintf("%d\n", config.c_aide_mailboxes);
cprintf("000\n");
- }
+ }
else if (!strcasecmp(cmd, "SET")) {
cprintf("%d Send configuration...\n", SEND_LISTING);
a = 0;
while (client_gets(buf), strcmp(buf, "000")) {
- switch(a) {
- case 0: safestrncpy(config.c_nodename, buf,
- sizeof config.c_nodename);
+ switch (a) {
+ case 0:
+ safestrncpy(config.c_nodename, buf,
+ sizeof config.c_nodename);
break;
- case 1: safestrncpy(config.c_fqdn, buf,
- sizeof config.c_fqdn);
+ case 1:
+ safestrncpy(config.c_fqdn, buf,
+ sizeof config.c_fqdn);
break;
- case 2: safestrncpy(config.c_humannode, buf,
- sizeof config.c_humannode);
+ case 2:
+ safestrncpy(config.c_humannode, buf,
+ sizeof config.c_humannode);
break;
- case 3: safestrncpy(config.c_phonenum, buf,
- sizeof config.c_phonenum);
+ case 3:
+ safestrncpy(config.c_phonenum, buf,
+ sizeof config.c_phonenum);
break;
- case 4: config.c_creataide = atoi(buf);
+ case 4:
+ config.c_creataide = atoi(buf);
break;
- case 5: config.c_sleeping = atoi(buf);
+ case 5:
+ config.c_sleeping = atoi(buf);
break;
- case 6: config.c_initax = atoi(buf);
- if (config.c_initax < 1) config.c_initax = 1;
- if (config.c_initax > 6) config.c_initax = 6;
+ case 6:
+ config.c_initax = atoi(buf);
+ if (config.c_initax < 1)
+ config.c_initax = 1;
+ if (config.c_initax > 6)
+ config.c_initax = 6;
break;
- case 7: config.c_regiscall = atoi(buf);
+ case 7:
+ config.c_regiscall = atoi(buf);
if (config.c_regiscall != 0)
config.c_regiscall = 1;
break;
- case 8: config.c_twitdetect = atoi(buf);
+ case 8:
+ config.c_twitdetect = atoi(buf);
if (config.c_twitdetect != 0)
config.c_twitdetect = 1;
break;
- case 9: safestrncpy(config.c_twitroom, buf,
- sizeof config.c_twitroom);
+ case 9:
+ safestrncpy(config.c_twitroom, buf,
+ sizeof config.c_twitroom);
break;
- case 10: safestrncpy(config.c_moreprompt, buf,
- sizeof config.c_moreprompt);
+ case 10:
+ safestrncpy(config.c_moreprompt, buf,
+ sizeof config.c_moreprompt);
break;
- case 11: config.c_restrict = atoi(buf);
+ case 11:
+ config.c_restrict = atoi(buf);
if (config.c_restrict != 0)
config.c_restrict = 1;
break;
- case 12: safestrncpy(config.c_bbs_city, buf,
- sizeof config.c_bbs_city);
+ case 12:
+ safestrncpy(config.c_bbs_city, buf,
+ sizeof config.c_bbs_city);
break;
- case 13: safestrncpy(config.c_sysadm, buf,
- sizeof config.c_sysadm);
+ case 13:
+ safestrncpy(config.c_sysadm, buf,
+ sizeof config.c_sysadm);
break;
- case 14: config.c_maxsessions = atoi(buf);
+ case 14:
+ config.c_maxsessions = atoi(buf);
if (config.c_maxsessions < 1)
config.c_maxsessions = 1;
break;
- case 15: safestrncpy(config.c_net_password, buf,
- sizeof config.c_net_password);
+ case 15:
+ safestrncpy(config.c_net_password, buf,
+ sizeof config.c_net_password);
break;
- case 16: config.c_userpurge = atoi(buf);
+ case 16:
+ config.c_userpurge = atoi(buf);
break;
- case 17: config.c_roompurge = atoi(buf);
+ case 17:
+ config.c_roompurge = atoi(buf);
break;
- case 18: safestrncpy(config.c_logpages, buf,
- sizeof config.c_logpages);
+ case 18:
+ safestrncpy(config.c_logpages, buf,
+ sizeof config.c_logpages);
break;
- case 19: config.c_createax = atoi(buf);
+ case 19:
+ config.c_createax = atoi(buf);
if (config.c_createax < 1)
config.c_createax = 1;
if (config.c_createax > 6)
config.c_createax = 6;
break;
- case 20: if (atoi(buf) >= 8192)
+ case 20:
+ if (atoi(buf) >= 8192)
config.c_maxmsglen = atoi(buf);
break;
- case 21: if (atoi(buf) >= 2)
+ case 21:
+ if (atoi(buf) >= 2)
config.c_min_workers = atoi(buf);
- case 22: if (atoi(buf) >= config.c_min_workers)
+ case 22:
+ if (atoi(buf) >= config.c_min_workers)
config.c_max_workers = atoi(buf);
- case 23: config.c_pop3_port = atoi(buf);
+ case 23:
+ config.c_pop3_port = atoi(buf);
break;
- case 24: config.c_smtp_port = atoi(buf);
+ case 24:
+ config.c_smtp_port = atoi(buf);
break;
- case 25: config.c_default_filter = atoi(buf);
- break;
- case 26: config.c_aide_zap = atoi(buf);
+ /* case 25 no longer exists */
+ case 26:
+ config.c_aide_zap = atoi(buf);
if (config.c_aide_zap != 0)
config.c_aide_zap = 1;
break;
- case 27: config.c_imap_port = atoi(buf);
+ case 27:
+ config.c_imap_port = atoi(buf);
break;
- case 28: config.c_net_freq = atol(buf);
+ case 28:
+ config.c_net_freq = atol(buf);
break;
- case 29: config.c_disable_newu = atoi(buf);
+ case 29:
+ config.c_disable_newu = atoi(buf);
if (config.c_disable_newu != 0)
config.c_disable_newu = 1;
break;
- case 30: config.c_aide_mailboxes = atoi(buf);
+ case 30:
+ config.c_aide_mailboxes = atoi(buf);
if (config.c_aide_mailboxes != 0)
config.c_aide_mailboxes = 1;
break;
}
- ++a;
- }
+ ++a;
+ }
put_config();
- snprintf(buf,sizeof buf,
+ snprintf(buf, sizeof buf,
"Global system configuration edited by %s\n",
CC->curr_user);
aide_message(buf);
if (strlen(config.c_logpages) > 0)
create_room(config.c_logpages, 3, "", 0, 1, 1);
- }
+ }
else if (!strcasecmp(cmd, "GETSYS")) {
extract(confname, argbuf, 1);
if (confptr != NULL) {
cprintf("%d %s\n", LISTING_FOLLOWS, confname);
client_write(confptr, strlen(confptr));
- if (confptr[strlen(confptr)-1] != 10)
+ if (confptr[strlen(confptr) - 1] != 10)
client_write("\n", 1);
cprintf("000\n");
phree(confptr);
- }
- else {
+ } else {
cprintf("%d No such configuration.\n",
- ERROR+ILLEGAL_VALUE);
+ ERROR + ILLEGAL_VALUE);
}
}
else if (!strcasecmp(cmd, "PUTSYS")) {
extract(confname, argbuf, 1);
cprintf("%d %s\n", SEND_LISTING, confname);
- confptr = CtdlReadMessageBody("000", config.c_maxmsglen, NULL);
+ confptr =
+ CtdlReadMessageBody("000", config.c_maxmsglen, NULL);
CtdlPutSysConfig(confname, confptr);
phree(confptr);
}
else {
cprintf("%d Illegal option(s) specified.\n",
- ERROR+ILLEGAL_VALUE);
- }
+ ERROR + ILLEGAL_VALUE);
}
+}
* current room. (Returns the number of messages processed.)
*/
int CtdlForEachMessage(int mode, long ref,
- int moderation_level,
char *content_type,
struct CtdlMessage *compare,
void (*CallBack) (long, void *),
* Now begin the traversal.
*/
if (num_msgs > 0) for (a = 0; a < num_msgs; ++a) {
- GetMetaData(&smi, msglist[a]);
-
- /* Filter out messages that are moderated below the level
- * currently being viewed at.
- */
- if (smi.meta_mod < moderation_level) {
- msglist[a] = 0L;
- }
/* If the caller is looking for a specific MIME type, filter
* out all messages which are not of the type requested.
*/
if (content_type != NULL) if (strlen(content_type) > 0) {
+
+ /* This call to GetMetaData() sits inside this loop
+ * so that we only do the extra database read per msg
+ * if we need to. Doing the extra read all the time
+ * really kills the server. If we ever need to use
+ * metadata for another search criterion, we need to
+ * move the read somewhere else -- but still be smart
+ * enough to only do the read if the caller has
+ * specified something that will need it.
+ */
+ GetMetaData(&smi, msglist[a]);
+
if (strcasecmp(smi.meta_content_type, content_type)) {
msglist[a] = 0L;
}
}
CtdlForEachMessage(mode, cm_ref,
- CC->usersupp.moderation_filter,
NULL, template, simple_listing, NULL);
if (template != NULL) CtdlFreeMessage(template);
cprintf("000\n");
memset(template, 0, sizeof(struct CtdlMessage));
template->cm_fields['E'] = strdoop(msg->cm_fields['E']);
- CtdlForEachMessage(MSGS_ALL, 0L, (-127), NULL, template,
- check_repl, NULL);
+ CtdlForEachMessage(MSGS_ALL, 0L, NULL, template, check_repl, NULL);
/* If a newer message exists with the same Extended ID, abort
* this save.
/* We want the last (and probably only) config in this room */
begin_critical_section(S_CONFIG);
config_msgnum = (-1L);
- CtdlForEachMessage(MSGS_LAST, 1, (-127), sysconfname, NULL,
+ CtdlForEachMessage(MSGS_LAST, 1, sysconfname, NULL,
CtdlGetSysConfigBackend, NULL);
msgnum = config_msgnum;
end_critical_section(S_CONFIG);
void simple_listing(long, void *);
int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
int CtdlForEachMessage(int mode, long ref,
- int moderation_level,
char *content_type,
struct CtdlMessage *compare,
void (*CallBack) (long, void *),
"Enable color support",US_COLOR);
}
- /* filter = intprompt("Moderation filter level", filter, -63, 63); */
-
}
if (mode==2) {
strprompt("Name of system administrator", &sc[13][0], 25);
strprompt("Paginator prompt", &sc[10][0], 79);
- /* this prompt is commented out until we finish the moderation system
- strprompt("Default moderation filter for new users", &sc[25][0], 4);
- */
-
/* Security parameters */
snprintf(sc[7], sizeof sc[7], "%d", (boolprompt(
void do_fsck_room(struct quickroom *qrbuf, void *data)
{
getroom(&CC->quickroom, qrbuf->QRname);
- CtdlForEachMessage(MSGS_ALL, 0L, (-127), NULL, NULL,
- do_fsck_msg, NULL);
+ CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL, do_fsck_msg, NULL);
}
/*
imap_free_msgids(); /* If there was already a map, free it */
- CtdlForEachMessage(MSGS_ALL, 0L, (-63), NULL, NULL,
+ CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL,
imap_add_single_msgid, NULL);
imap_set_seen_flags();
for (i=0; i<IMAP->num_msgs; ++i) {
count = CtdlForEachMessage(MSGS_EQ, IMAP->msgids[i],
- (-63), NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL);
if (count == 0) {
cprintf("* %d EXPUNGE\r\n", i+1);
/*
* Now peruse the room for *new* messages only.
*/
- CtdlForEachMessage(MSGS_GT, original_highest, (-63), NULL, NULL,
+ CtdlForEachMessage(MSGS_GT, original_highest, NULL, NULL,
imap_add_single_msgid, NULL);
imap_set_seen_flags();
void inetcfg_init(void) {
if (getroom(&CC->quickroom, SYSCONFIGROOM) != 0) return;
- CtdlForEachMessage(MSGS_LAST, 1, (-127), INTERNETCFG, NULL,
+ CtdlForEachMessage(MSGS_LAST, 1, INTERNETCFG, NULL,
inetcfg_init_backend, NULL);
}
+++ /dev/null
-/*
- * $Id$
- *
- * Server-side functions which handle message moderation.
- *
- */
-
-#include "sysdep.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <pwd.h>
-#include <errno.h>
-#include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-#include <sys/wait.h>
-#include <string.h>
-#include <limits.h>
-#include "citadel.h"
-#include "server.h"
-#include "sysdep_decls.h"
-#include "citserver.h"
-#include "support.h"
-#include "config.h"
-#include "control.h"
-#include "dynloader.h"
-#include "room_ops.h"
-#include "user_ops.h"
-#include "policy.h"
-#include "database.h"
-#include "msgbase.h"
-#include "tools.h"
-
-
-
-/*
- * moderate a message
- */
-void cmd_mmod(char *argbuf) {
- long msgnum;
- int newlevel;
- struct MetaData smi;
- int is_message_in_room;
-
- /* user must be at least a Room Aide to moderate */
- if (CtdlAccessCheck(ac_room_aide)) return;
-
- msgnum = extract_long(argbuf, 0);
- newlevel = extract_int(argbuf, 1);
-
- if ( (newlevel < (-63)) || (newlevel > (+63)) ) {
- cprintf("%d %d is not a valid moderation level.\n",
- ERROR+ILLEGAL_VALUE, newlevel);
- return;
- }
-
- is_message_in_room = CtdlForEachMessage(MSGS_EQ, msgnum, (-127),
- NULL, NULL, NULL, NULL);
- if (!is_message_in_room) {
- cprintf("%d Message %ld is not in this room.\n",
- ERROR+ILLEGAL_VALUE, msgnum);
- return;
- }
-
- GetMetaData(&smi, msgnum);
- smi.meta_mod = newlevel;
- PutMetaData(&smi);
-
- cprintf("%d Message %ld is moderated to %d\n", CIT_OK, msgnum, newlevel);
-}
-
-
-char *Dynamic_Module_Init(void)
-{
- CtdlRegisterProtoHook(cmd_mmod, "MMOD", "Moderate a message");
- return "$Id$";
-}
/* Do something useful */
- CtdlForEachMessage(MSGS_GT, sc.lastsent, (-63), NULL, NULL,
+ CtdlForEachMessage(MSGS_GT, sc.lastsent, NULL, NULL,
network_spool_msg, &sc);
if (getroom(&CC->quickroom, MAILROOM) != 0) return(-1);
/* Load up the messages */
- CtdlForEachMessage(MSGS_ALL, 0L, (-63), NULL, NULL,
+ CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL,
pop3_add_message, NULL);
/* Figure out which are old and which are new */
lprintf(3, "Cannot find room <%s>\n", SMTP_SPOOLOUT_ROOM);
return;
}
- CtdlForEachMessage(MSGS_ALL, 0L, (-127),
+ CtdlForEachMessage(MSGS_ALL, 0L,
SPOOLMIME, NULL, smtp_do_procmsg, NULL);
lprintf(7, "SMTP: queue run completed\n");
cprintf("%s\n", usbuf->fullname);
cprintf("%d\n", usbuf->USscreenwidth);
cprintf("%d\n", usbuf->USscreenheight);
- cprintf("%d\n", usbuf->moderation_filter);
}
/* format of message list export is all message numbers output
* one per line terminated by a 0.
*/
- CtdlForEachMessage(MSGS_ALL, 0L, (-127), NULL, NULL,
+ CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL,
artv_export_room_msg, NULL);
cprintf("0\n");
cprintf("%ld\n", msgnum);
cprintf("%d\n", smi.meta_refcount);
cprintf("%s\n", smi.meta_content_type);
- cprintf("%d\n", smi.meta_mod);
serialize_message(&smr, msg);
CtdlFreeMessage(msg);
cprintf("%d\n", config.c_max_workers);
cprintf("%d\n", config.c_pop3_port);
cprintf("%d\n", config.c_smtp_port);
- cprintf("%d\n", config.c_default_filter);
/* Export the control file */
get_control();
client_gets(buf); config.c_max_workers = atoi(buf);
client_gets(buf); config.c_pop3_port = atoi(buf);
client_gets(buf); config.c_smtp_port = atoi(buf);
- client_gets(buf); config.c_default_filter = atoi(buf);
put_config();
lprintf(7, "Imported config file\n");
}
client_gets(usbuf.fullname);
client_gets(buf); usbuf.USscreenwidth = atoi(buf);
client_gets(buf); usbuf.USscreenheight = atoi(buf);
- client_gets(buf); usbuf.moderation_filter = atoi(buf);
putuser(&usbuf);
}
smi.meta_msgnum = msgnum;
client_gets(buf); smi.meta_refcount = atoi(buf);
client_gets(smi.meta_content_type);
- client_gets(buf); smi.meta_mod = atoi(buf);
lprintf(7, "message #%ld\n", msgnum);
CtdlDirectoryInit();
/* We want the last (and probably only) vcard in this room */
- CtdlForEachMessage(MSGS_ALL, 0, (-127), "text/x-vcard",
+ CtdlForEachMessage(MSGS_ALL, 0, "text/x-vcard",
NULL, vcard_add_to_directory, NULL);
getroom(&CC->quickroom, hold_rm); /* return to saved room */
/* We want the last (and probably only) vcard in this room */
VC->msgnum = (-1);
- CtdlForEachMessage(MSGS_LAST, 1, (-127), "text/x-vcard",
+ CtdlForEachMessage(MSGS_LAST, 1, "text/x-vcard",
NULL, vcard_gu_backend, NULL);
getroom(&CC->quickroom, hold_rm); /* return to saved room */
long meta_msgnum; /* Message number in *local* message base */
int meta_refcount; /* Number of rooms which point to this msg */
char meta_content_type[64];
- char meta_mod; /* Moderated to what level? */
/* more stuff will be added to this record in the future */
};
+++ /dev/null
-(NOTE: the moderation system is not finished yet, and as such, as been
-disabled in the current release.)
-
- TECHNICAL DISCUSSION OF THE CITADEL/UX MODERATION SYSTEM
-
- Starting with version ?.??, the Citadel system supports moderation of
-messages. This is used for both internal processing and for the more
-traditional filtering purposes.
-
- The central design thrust behind this design is to maximize the
-"signal to noise ratio" while minimizing "censorship." Users may choose to
-filter at a very low threshold, reading everything, or at a higher threshold,
-reading only selected messages.
-
- Each message now carries a moderation level in its supplementary message base
-record (smi.smi_mod). This is an 8-bit signed integer with values ranging from
--127 to 127. The following standards apply:
-
-
- LEVEL PURPOSE
-
- -127 "System overhead" message. These should never be
- shown to users. An overhead message might contain
- the room's network configuration or something to that
- effect. (Not yet implemented, but we probably will
- do it this way.)
-
- -100 Deleted message. Aides might choose to browse deleted
- messages, un-deleting them if appropriate.
-
- -63 to +63 Normal user-mode messages. All messages start out at
- level 0 when first posted (or when no supplementary
- message base record exists).
-
-
- On a typical hobbyist BBS with a small administrative staff, most messages
-will remain at level 0, with perhaps the off-topic ones getting moderated
-to -1 or -2, providing the less tolerant users with a way of avoiding reading
-through drivel.
-
- On a very large system with many active moderators, there might be a high
-level of activity involving moderating _up_ the messages that are the most
-poignant or pertinent. In this case, users might choose to filter at a level
-higher than 0, seeing only the messages that someone decided were worth
-reading.
#define US_PAGINATOR 2048 /* Pause after each screen of text */
There are other bits, too, but they can't be changed by the user (see below).
-
- The fourth parameter, if present, is the moderation level this user is
-filtering at.
-
-
+
+
SETU (SET User configuration)
This command does the opposite of SETU: it takes the screen dimensions and
user options (which were probably obtained with a GETU command, and perhaps
modified by the user) and writes them to the user account. This command
-should be passed four parameters: the screen width, the screen height,
-the option bits (see above), and the desired moderation level to filter at.
+should be passed three parameters: the screen width, the screen height, and
+the option bits (see above).
Note that there exist bits here which are not listed in this document. Some
are flags that can only be set by Aides or the system administrator. SETU
23. Maximum number of worker threads
24. Port number for POP3 service
25. Port number for SMTP service
- 26. Default moderation filter level for new users (-63 to +63)
+ 26. (unused)
27. Flag (0 or 1) - allow Aides to zap (forget) rooms
28. Port number for IMAP service
29. How often (in seconds) to run the networker
number representing the current state of the flag.
- MMOD (MODerate a Message)
-
- Set or change the moderation level of a message. The two parameters passed
-to this command should be the message number and the desired moderation level.
-Please refer to the "moderation.txt" document for a description of some
-commonly used moderation levels.
-
- If the command succeeds, OK is returned. If the specified message does not
-exist in the current room, or if the specified moderation level is not within
-acceptable limits, ERROR+ILLEGAL_VALUE is returned. This command requires at
-least Room Aide access; if the calling user is not an Aide, or a Room Aide for
-the current room, ERROR+HIGHER_ACCESS_REQUIRED is returned.
-
-
REQT (REQuest client Termination)
Request that the specified client (or all clients) log off. Aide level
sizeof(struct usersupp) : cdbus->len));
cdb_free(cdbus);
- if (usbuf->version < 573) {
- CC->usersupp.moderation_filter = config.c_default_filter;
- }
return (0);
}
usbuf.USscreenwidth = 80;
usbuf.USscreenheight = 24;
usbuf.lastcall = time(NULL);
- usbuf.moderation_filter = config.c_default_filter;
/* fetch a new user number */
usbuf.usernum = get_new_user_number();
return;
getuser(&CC->usersupp, CC->curr_user);
- cprintf("%d %d|%d|%d|%d\n",
+ cprintf("%d %d|%d|%d|\n",
CIT_OK,
CC->usersupp.USscreenwidth,
CC->usersupp.USscreenheight,
- (CC->usersupp.flags & US_USER_SET),
- CC->usersupp.moderation_filter
+ (CC->usersupp.flags & US_USER_SET)
);
}
CC->usersupp.flags = CC->usersupp.flags |
(extract_int(new_parms, 2) & US_USER_SET);
- if (num_parms(new_parms) >= 4) {
- new_mod = extract_int(new_parms, 3);
- lprintf(9, "new_mod extracted to %d\n", new_mod);
-
- /* Aides cannot set the filter level lower than -100 */
- if (new_mod < (-100))
- new_mod = -100;
-
- /* Normal users cannot set the filter level lower than -63 */
- if ((new_mod < (-63)) && (CC->usersupp.axlevel < 6))
- new_mod = -63;
-
- /* Nobody can set the filter level higher than +63 */
- if (new_mod > 63)
- new_mod = 63;
-
- CC->usersupp.moderation_filter = new_mod;
- lprintf(9, "new_mod processed to %d\n", new_mod);
- }
lputuser(&CC->usersupp);
cprintf("%d Ok\n", CIT_OK);
}