$Log$
+ Revision 607.11 2003/06/29 03:58:41 ajc
+ * Renamed fields in 'struct config' which are no longer relevant (but kept
+ them in place to avoid corrupting everyone's data files). Removed them
+ entirely from serv_vandelay.c.
+
Revision 607.10 2003/06/28 05:12:56 ajc
* Bump internal version number to 6.08
* Use (-1) instead of BBSUID as the uid of user records which exist only
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
* to fiddle with the decimal). REV_MIN is the oldest version of Citadel
* whose data files are compatible with the current version. If the data files
* are older than REV_MIN, none of the programs will work until the setup
- * program is run again to bring things up to date.
+ * program is run again to bring things up to date. EXPORT_REV_MIN is the
+ * oldest version of Citadel whose export files we can read. The latter is
+ * usually more strict because you're not really supposed to dump/load and
+ * upgrade at the same time.
*/
#define REV_LEVEL 608 /* This version */
-#define REV_MIN 591 /* Oldest compatible version */
+#define REV_MIN 591 /* Oldest compatible database */
+#define EXPORT_REV_MIN 608 /* Oldest compatible export files */
#define SERVER_TYPE 0 /* zero for stock Citadel/UX; other developers please
obtain SERVER_TYPE codes for your implementations */
/*
- * Global system configuration
+ * Global system configuration.
+ *
+ * Developers: please do NOT remove the fields labelled "not in use". We
+ * can't simply remove them from the struct, because that would render the
+ * configs on existing systems corrupt. However, if you need the same number
+ * of bytes for a *new* field, feel free to use them.
*/
struct config {
char c_nodename[16]; /* Unqualified "short" nodename */
char c_twitroom[ROOMNAMELEN]; /* twit detect msg move to room */
char c_moreprompt[80]; /* paginator prompt */
char c_restrict; /* restrict Internet mail flag */
- long c_msgbase; /* size of message base (obsolete) */
+ long c_niu_1; /* (not in use) */
char c_bbs_city[32]; /* physical location of server */
char c_sysadm[26]; /* name of system administrator */
- char c_bucket_dir[15]; /* bit bucket for files... */
+ char c_niu_2[15]; /* (not in use) */
int c_setup_level; /* what rev level we've setup to */
int c_maxsessions; /* maximum concurrent sessions */
char c_net_password[20]; /* system net password (obsolete) */
char c_aideroom[ROOMNAMELEN]; /* Name of aideroom (Aide) */
};
+/*
+ * This struct stores a list of rooms with new messages which the client
+ * fetches from the server. This allows the client to "march" through
+ * relevant rooms without having to ask the server each time where to go next.
+ */
struct march {
struct march *next;
char march_name[ROOMNAMELEN];
#define RESTRICT_INTERNET config.c_restrict
/*
- * User records
+ * User records. (It's called "usersupp" because in ancient times it was
+ * a supplement to /etc/passwd, but not anymore.)
*/
struct usersupp { /* User record */
int version; /* Cit vers. which created this rec */
#define MM_VALID 4 /* New users need validating */
/*
- * Room records
+ * Room records. (It's called "quickroom" because it was once merely an
+ * index to a "fullroom" file, but the new database layout changed everything.)
*/
struct quickroom {
char QRname[ROOMNAMELEN]; /* Name of room */
cprintf("%s\n", config.c_twitroom);
cprintf("%s\n", config.c_moreprompt);
cprintf("%d\n", config.c_restrict);
- cprintf("%ld\n", config.c_msgbase);
cprintf("%s\n", config.c_bbs_city);
cprintf("%s\n", config.c_sysadm);
- cprintf("%s\n", config.c_bucket_dir);
cprintf("%d\n", config.c_setup_level);
cprintf("%d\n", config.c_maxsessions);
cprintf("%s\n", config.c_net_password);
client_gets(config.c_twitroom);
client_gets(config.c_moreprompt);
client_gets(buf); config.c_restrict = atoi(buf);
- client_gets(buf); config.c_msgbase = atol(buf);
client_gets(config.c_bbs_city);
client_gets(config.c_sysadm);
lprintf(9, "c_sysadm = %s\n", config.c_sysadm);
- client_gets(config.c_bucket_dir);
client_gets(buf); config.c_setup_level = atoi(buf);
client_gets(buf); config.c_maxsessions = atoi(buf);
client_gets(config.c_net_password);
if (!strcasecmp(buf, "version")) {
client_gets(s_version);
version = atoi(s_version);
- if ((version < REV_MIN) || (version > REV_LEVEL)) {
+ if ((version<EXPORT_REV_MIN) || (version>REV_LEVEL)) {
lprintf(7, "Version mismatch - aborting\n");
break;
}
strcpy(config.c_moreprompt, "<more>");
if (strlen(config.c_twitroom) == 0)
strcpy(config.c_twitroom, "Trashcan");
- if (strlen(config.c_bucket_dir) == 0)
- strcpy(config.c_bucket_dir, "bitbucket");
if (strlen(config.c_net_password) == 0)
strcpy(config.c_net_password, "netpassword");
if (strlen(config.c_baseroom) == 0)
mkdir("help", 0700);
mkdir("images", 0700);
mkdir("netconfigs", 0700);
- mkdir(config.c_bucket_dir, 0700);
/* Delete a bunch of old files from Citadel v4; don't need anymore */
system("rm -fr ./chatpipes ./expressmsgs ./sessions 2>/dev/null");