$Log$
+ Revision 607.15 2003/06/29 19:54:39 ajc
+ * Renamed "struct user" to "struct ctdluser"
+ * Renamed "struct room" to "struct ctdlroom"
+
Revision 607.14 2003/06/29 04:13:32 ajc
* Renamed:
S_QUICKROOM to S_ROOMS
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
int stored_password = 0;
char password[SIZ];
struct ctdlipcmisc chek;
- struct user *myself = NULL;
+ struct ctdluser *myself = NULL;
CtdlIPC* ipc; /* Our server connection */
int r; /* IPC result code */
/*
* User records.
*/
-struct user { /* User record */
+struct ctdluser { /* User record */
int version; /* Cit vers. which created this rec */
uid_t uid; /* Associate with a unix account? */
char password[32]; /* password (for BBS-only users) */
/*
* Room records.
*/
-struct room {
+struct ctdlroom {
char QRname[ROOMNAMELEN]; /* Name of room */
char QRpasswd[10]; /* Only valid if it's a private rm */
long QRroomaide; /* User number of room aide */
/* GETU */
-/* Caller must free the struct user; caller may pass an existing one */
-int CtdlIPCGetConfig(CtdlIPC *ipc, struct user **uret, char *cret)
+/* Caller must free the struct ctdluser; caller may pass an existing one */
+int CtdlIPCGetConfig(CtdlIPC *ipc, struct ctdluser **uret, char *cret)
{
register int ret;
if (!cret) return -2;
if (!uret) return -2;
- if (!*uret) *uret = (struct user *)calloc(1, sizeof (struct user));
+ if (!*uret) *uret = (struct ctdluser *)calloc(1, sizeof (struct ctdluser));
if (!*uret) return -1;
ret = CtdlIPCGenericCommand(ipc, "GETU", NULL, 0, NULL, NULL, cret);
/* SETU */
-int CtdlIPCSetConfig(CtdlIPC *ipc, struct user *uret, char *cret)
+int CtdlIPCSetConfig(CtdlIPC *ipc, struct ctdluser *uret, char *cret)
{
char aaa[48];
/* GETR */
-int CtdlIPCGetRoomAttributes(CtdlIPC *ipc, struct room **qret, char *cret)
+int CtdlIPCGetRoomAttributes(CtdlIPC *ipc, struct ctdlroom **qret, char *cret)
{
register int ret;
if (!cret) return -2;
if (!qret) return -2;
- if (!*qret) *qret = (struct room *)calloc(1, sizeof (struct room));
+ if (!*qret) *qret = (struct ctdlroom *)calloc(1, sizeof (struct ctdlroom));
if (!*qret) return -1;
ret = CtdlIPCGenericCommand(ipc, "GETR", NULL, 0, NULL, NULL, cret);
/* SETR */
/* set forget to kick all users out of room */
-int CtdlIPCSetRoomAttributes(CtdlIPC *ipc, int forget, struct room *qret, char *cret)
+int CtdlIPCSetRoomAttributes(CtdlIPC *ipc, int forget, struct ctdlroom *qret, char *cret)
{
register int ret;
char *aaa;
/* AGUP */
int CtdlIPCAideGetUserParameters(CtdlIPC *ipc, const char *who,
- struct user **uret, char *cret)
+ struct ctdluser **uret, char *cret)
{
register int ret;
char aaa[SIZ];
if (!cret) return -2;
if (!uret) return -2;
- if (!*uret) *uret = (struct user *)calloc(1, sizeof(struct user));
+ if (!*uret) *uret = (struct ctdluser *)calloc(1, sizeof(struct ctdluser));
if (!*uret) return -1;
sprintf(aaa, "AGUP %s", who);
/* ASUP */
-int CtdlIPCAideSetUserParameters(CtdlIPC *ipc, const struct user *uret, char *cret)
+int CtdlIPCAideSetUserParameters(CtdlIPC *ipc, const struct ctdluser *uret, char *cret)
{
register int ret;
char *aaa;
int CtdlIPCChangePassword(CtdlIPC *ipc, const char *passwd, char *cret);
int CtdlIPCKnownRooms(CtdlIPC *ipc, enum RoomList which, int floor,
struct march **listing, char *cret);
-int CtdlIPCGetConfig(CtdlIPC *ipc, struct user **uret, char *cret);
-int CtdlIPCSetConfig(CtdlIPC *ipc, struct user *uret, char *cret);
+int CtdlIPCGetConfig(CtdlIPC *ipc, struct ctdluser **uret, char *cret);
+int CtdlIPCSetConfig(CtdlIPC *ipc, struct ctdluser *uret, char *cret);
int CtdlIPCGotoRoom(CtdlIPC *ipc, const char *room, const char *passwd,
struct ctdlipcroom **rret, char *cret);
int CtdlIPCGetMessages(CtdlIPC *ipc, enum MessageList which, int whicharg,
int CtdlIPCSetLastRead(CtdlIPC *ipc, long msgnum, char *cret);
int CtdlIPCInviteUserToRoom(CtdlIPC *ipc, const char *username, char *cret);
int CtdlIPCKickoutUserFromRoom(CtdlIPC *ipc, const char *username, char *cret);
-int CtdlIPCGetRoomAttributes(CtdlIPC *ipc, struct room **qret, char *cret);
-int CtdlIPCSetRoomAttributes(CtdlIPC *ipc, int forget, struct room *qret,
+int CtdlIPCGetRoomAttributes(CtdlIPC *ipc, struct ctdlroom **qret, char *cret);
+int CtdlIPCSetRoomAttributes(CtdlIPC *ipc, int forget, struct ctdlroom *qret,
char *cret);
int CtdlIPCGetRoomAide(CtdlIPC *ipc, char *cret);
int CtdlIPCSetRoomAide(CtdlIPC *ipc, const char *username, char *cret);
int CtdlIPCChangeUsername(CtdlIPC *ipc, const char *username, char *cret);
time_t CtdlIPCServerTime(CtdlIPC *ipc, char *crert);
int CtdlIPCAideGetUserParameters(CtdlIPC *ipc, const char *who,
- struct user **uret, char *cret);
-int CtdlIPCAideSetUserParameters(CtdlIPC *ipc, const struct user *uret, char *cret);
+ struct ctdluser **uret, char *cret);
+int CtdlIPCAideSetUserParameters(CtdlIPC *ipc, const struct ctdluser *uret, char *cret);
int CtdlIPCGetMessageExpirationPolicy(CtdlIPC *ipc, int which,
struct ExpirePolicy **policy, char *cret);
int CtdlIPCSetMessageExpirationPolicy(CtdlIPC *ipc, int which,
*/
void master_startup(void) {
struct timeval tv;
- struct room qrbuf;
+ struct ctdlroom qrbuf;
lprintf(9, "master_startup() started\n");
time(&server_startup_time);
char newroom[SIZ];
char buf[SIZ];
int a;
- struct room qrbuf;
+ struct ctdlroom qrbuf;
extract(filename, cmdbuf, 0);
extract(newroom, cmdbuf, 1);
{
char filename[SIZ];
char pathname[SIZ];
- struct user usbuf;
+ struct ctdluser usbuf;
char which_user[USERNAME_SIZE];
int which_floor;
int a;
* NOTE: this function pair should ONLY be called during startup. It is NOT
* thread safe.
*/
-void check_ref_counts_backend(struct room *qrbuf, void *data) {
+void check_ref_counts_backend(struct ctdlroom *qrbuf, void *data) {
struct floor flbuf;
getfloor(&flbuf, qrbuf->QRfloor);
}
/*
- * Convert a struct room to an IMAP-compatible mailbox name.
+ * Convert a struct ctdlroom to an IMAP-compatible mailbox name.
*/
-void imap_mailboxname(char *buf, int bufsize, struct room *qrbuf)
+void imap_mailboxname(char *buf, int bufsize, struct ctdlroom *qrbuf)
{
struct floor *fl;
int i;
void imap_strout(char *buf);
int imap_parameterize(char **args, char *buf);
-void imap_mailboxname(char *buf, int bufsize, struct room *qrbuf);
+void imap_mailboxname(char *buf, int bufsize, struct ctdlroom *qrbuf);
void imap_ial_out(struct internet_address_list *ialist);
int imap_roomname(char *buf, int bufsize, char *foldername);
int imap_is_message_set(char *);
*
* FIXME ... this needs to be updated to handle aliases.
*/
-int fuzzy_match(struct user *us, char *matchstring) {
+int fuzzy_match(struct ctdluser *us, char *matchstring) {
int a;
if ( (!strncasecmp(matchstring, "cit", 3))
};
-int fuzzy_match(struct user *us, char *matchstring);
+int fuzzy_match(struct ctdluser *us, char *matchstring);
void process_rfc822_addr(const char *rfc822, char *user, char *node, char *name);
char *rfc822_fetch_field(char *rfc822, char *fieldname);
char recipient[SIZ];
long newmsgid;
char *mptr = NULL;
- struct user userbuf;
+ struct ctdluser userbuf;
int a, i;
struct MetaData smi;
FILE *network_fp = NULL;
*/
struct CtdlMessage *CtdlMakeMessage(
- struct user *author, /* author's user structure */
+ struct ctdluser *author, /* author's user structure */
char *recipient, /* NULL if it's not mail */
char *room, /* room where it's going */
int type, /* see MES_ types in header file */
* Check to see if the specified user has Internet mail permission
* (returns nonzero if permission is granted)
*/
-int CtdlCheckInternetMailPermission(struct user *who) {
+int CtdlCheckInternetMailPermission(struct ctdluser *who) {
/* Globally enabled? */
if (config.c_restrict == 0) return(1);
int i, j;
int mailtype;
int invalid;
- struct user tempUS;
- struct room tempQR;
+ struct ctdluser tempUS;
+ struct ctdlroom tempQR;
/* Initialize */
ret = (struct recptypes *) malloc(sizeof(struct recptypes));
)
{
- struct room qrbuf;
+ struct ctdlroom qrbuf;
struct cdbdata *cdbfr;
long *msglist = NULL;
long *dellist = NULL;
{
long num;
char targ[SIZ];
- struct room qtemp;
+ struct ctdlroom qtemp;
int err;
int is_copy = 0;
void CtdlWriteObject(char *req_room, /* Room to stuff it in */
char *content_type, /* MIME type of this object */
char *tempfilename, /* Where to fetch it from */
- struct user *is_mailbox, /* Mailbox room? */
+ struct ctdluser *is_mailbox, /* Mailbox room? */
int is_binary, /* Is encoding necessary? */
int is_unique, /* Del others of this type? */
unsigned int flags /* Internal save flags */
{
FILE *fp;
- struct room qrbuf;
+ struct ctdlroom qrbuf;
char roomname[ROOMNAMELEN];
struct CtdlMessage *msg;
void (*CallBack) (long, void *),
void *userdata);
int CtdlDeleteMessages(char *, long, char *);
-void CtdlWriteObject(char *, char *, char *, struct user *,
+void CtdlWriteObject(char *, char *, char *, struct ctdluser *,
int, int, unsigned int);
struct CtdlMessage *CtdlFetchMessage(long msgnum);
void CtdlFreeMessage(struct CtdlMessage *msg);
struct recptypes *validate_recipients(char *recipients);
void CtdlGetSeen(char *buf);
struct CtdlMessage *CtdlMakeMessage(
- struct user *author, /* author's user structure */
+ struct ctdluser *author, /* author's user structure */
char *recipient, /* NULL if it's not mail */
char *room, /* room where it's going */
int type, /* see MES_ types in header file */
char *subject, /* Subject (optional) */
char *preformatted_text /* ...or NULL to read text from client */
);
-int CtdlCheckInternetMailPermission(struct user *who);
+int CtdlCheckInternetMailPermission(struct ctdluser *who);
int CtdlIsMe(char *addr);
/*
* Retrieve the applicable expire policy for a specific room
*/
-void GetExpirePolicy(struct ExpirePolicy *epbuf, struct room *qrbuf) {
+void GetExpirePolicy(struct ExpirePolicy *epbuf, struct ctdlroom *qrbuf) {
struct floor *fl;
/* If the room has its own policy, return it */
/* $Id$ */
-void GetExpirePolicy(struct ExpirePolicy *epbuf, struct room *qrbuf);
+void GetExpirePolicy(struct ExpirePolicy *epbuf, struct ctdlroom *qrbuf);
void cmd_gpex(char *argbuf);
void cmd_spex(char *argbuf);
/*
* Generic routine for determining user access to rooms
*/
-int CtdlRoomAccess(struct room *roombuf, struct user *userbuf)
+int CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf)
{
int retval = 0;
struct visit vbuf;
/*
* Self-checking stuff for a room record read into memory
*/
-void room_sanity_check(struct room *qrbuf)
+void room_sanity_check(struct ctdlroom *qrbuf)
{
/* Mailbox rooms are always on the lowest floor */
if (qrbuf->QRflags & QR_MAILBOX) {
/*
* getroom() - retrieve room data from disk
*/
-int getroom(struct room *qrbuf, char *room_name)
+int getroom(struct ctdlroom *qrbuf, char *room_name)
{
struct cdbdata *cdbqr;
char lowercase_name[ROOMNAMELEN];
}
lowercase_name[a] = 0;
- memset(qrbuf, 0, sizeof(struct room));
+ memset(qrbuf, 0, sizeof(struct ctdlroom));
/* First, try the public namespace */
cdbqr = cdb_fetch(CDB_ROOMS,
}
if (cdbqr != NULL) {
memcpy(qrbuf, cdbqr->ptr,
- ((cdbqr->len > sizeof(struct room)) ?
- sizeof(struct room) : cdbqr->len));
+ ((cdbqr->len > sizeof(struct ctdlroom)) ?
+ sizeof(struct ctdlroom) : cdbqr->len));
cdb_free(cdbqr);
room_sanity_check(qrbuf);
/*
* lgetroom() - same as getroom() but locks the record (if supported)
*/
-int lgetroom(struct room *qrbuf, char *room_name)
+int lgetroom(struct ctdlroom *qrbuf, char *room_name)
{
register int retval;
retval = getroom(qrbuf, room_name);
* b_putroom() - back end to putroom() and b_deleteroom()
* (if the supplied buffer is NULL, delete the room record)
*/
-void b_putroom(struct room *qrbuf, char *room_name)
+void b_putroom(struct ctdlroom *qrbuf, char *room_name)
{
char lowercase_name[ROOMNAMELEN];
int a;
time(&qrbuf->QRmtime);
cdb_store(CDB_ROOMS,
lowercase_name, strlen(lowercase_name),
- qrbuf, sizeof(struct room));
+ qrbuf, sizeof(struct ctdlroom));
}
}
/*
* putroom() - store room data to disk
*/
-void putroom(struct room *qrbuf) {
+void putroom(struct ctdlroom *qrbuf) {
b_putroom(qrbuf, qrbuf->QRname);
}
/*
* lputroom() - same as putroom() but unlocks the record (if supported)
*/
-void lputroom(struct room *qrbuf)
+void lputroom(struct ctdlroom *qrbuf)
{
putroom(qrbuf);
/*
* Traverse the room file...
*/
-void ForEachRoom(void (*CallBack) (struct room *EachRoom, void *out_data),
+void ForEachRoom(void (*CallBack) (struct ctdlroom *EachRoom, void *out_data),
void *in_data)
{
- struct room qrbuf;
+ struct ctdlroom qrbuf;
struct cdbdata *cdbqr;
cdb_rewind(CDB_ROOMS);
while (cdbqr = cdb_next_item(CDB_ROOMS), cdbqr != NULL) {
- memset(&qrbuf, 0, sizeof(struct room));
+ memset(&qrbuf, 0, sizeof(struct ctdlroom));
memcpy(&qrbuf, cdbqr->ptr,
- ((cdbqr->len > sizeof(struct room)) ?
- sizeof(struct room) : cdbqr->len));
+ ((cdbqr->len > sizeof(struct ctdlroom)) ?
+ sizeof(struct ctdlroom) : cdbqr->len));
cdb_free(cdbqr);
room_sanity_check(&qrbuf);
if (qrbuf.QRflags & QR_INUSE)
/*
* delete_msglist() - delete room message pointers
*/
-void delete_msglist(struct room *whichroom)
+void delete_msglist(struct ctdlroom *whichroom)
{
struct cdbdata *cdbml;
/*
* Determine whether a given room is non-editable.
*/
-int is_noneditable(struct room *qrbuf)
+int is_noneditable(struct ctdlroom *qrbuf)
{
/* Mail> rooms are non-editable */
/*
* Back-back-end for all room listing commands
*/
-void list_roomname(struct room *qrbuf, int ra)
+void list_roomname(struct ctdlroom *qrbuf, int ra)
{
char truncated_roomname[ROOMNAMELEN];
/*
* cmd_lrms() - List all accessible rooms, known or forgotten
*/
-void cmd_lrms_backend(struct room *qrbuf, void *data)
+void cmd_lrms_backend(struct ctdlroom *qrbuf, void *data)
{
int FloorBeingSearched = (-1);
int ra;
/*
* cmd_lkra() - List all known rooms
*/
-void cmd_lkra_backend(struct room *qrbuf, void *data)
+void cmd_lkra_backend(struct ctdlroom *qrbuf, void *data)
{
int FloorBeingSearched = (-1);
int ra;
-void cmd_lprm_backend(struct room *qrbuf, void *data)
+void cmd_lprm_backend(struct ctdlroom *qrbuf, void *data)
{
int FloorBeingSearched = (-1);
int ra;
/*
* cmd_lkrn() - List all known rooms with new messages
*/
-void cmd_lkrn_backend(struct room *qrbuf, void *data)
+void cmd_lkrn_backend(struct ctdlroom *qrbuf, void *data)
{
int FloorBeingSearched = (-1);
int ra;
/*
* cmd_lkro() - List all known rooms
*/
-void cmd_lkro_backend(struct room *qrbuf, void *data)
+void cmd_lkro_backend(struct ctdlroom *qrbuf, void *data)
{
int FloorBeingSearched = (-1);
int ra;
/*
* cmd_lzrm() - List all forgotten rooms
*/
-void cmd_lzrm_backend(struct room *qrbuf, void *data)
+void cmd_lzrm_backend(struct ctdlroom *qrbuf, void *data)
{
int FloorBeingSearched = (-1);
*/
void cmd_goto(char *gargs)
{
- struct room QRscratch;
+ struct ctdlroom QRscratch;
int c;
int ok = 0;
int ra;
/* Let internal programs go directly to any room. */
if (CC->internal_pgm) {
memcpy(&CC->room, &QRscratch,
- sizeof(struct room));
+ sizeof(struct ctdlroom));
usergoto(NULL, 1, transiently, NULL, NULL);
return;
}
if ((QRscratch.QRflags & QR_MAILBOX) &&
((ra & UA_GOTOALLOWED))) {
memcpy(&CC->room, &QRscratch,
- sizeof(struct room));
+ sizeof(struct ctdlroom));
usergoto(NULL, 1, transiently, NULL, NULL);
return;
} else if ((QRscratch.QRflags & QR_PASSWORDED) &&
goto NOPE;
} else {
memcpy(&CC->room, &QRscratch,
- sizeof(struct room));
+ sizeof(struct ctdlroom));
usergoto(NULL, 1, transiently, NULL, NULL);
return;
}
void cmd_whok(void)
{
- struct user temp;
+ struct ctdluser temp;
struct cdbdata *cdbus;
getuser(&CC->user, CC->curr_user);
*/
int CtdlRenameRoom(char *old_name, char *new_name, int new_floor) {
int old_floor = 0;
- struct room qrbuf;
- struct room qrtmp;
+ struct ctdlroom qrbuf;
+ struct ctdlroom qrtmp;
int ret = 0;
struct floor *fl;
struct floor flbuf;
*/
void cmd_geta(void)
{
- struct user usbuf;
+ struct ctdluser usbuf;
if (CtdlAccessCheck(ac_logged_in)) return;
*/
void cmd_seta(char *new_ra)
{
- struct user usbuf;
+ struct ctdluser usbuf;
long newu;
char buf[SIZ];
int post_notice;
* Generate an associated file name for a room
*/
void assoc_file_name(char *buf, size_t n,
- struct room *qrbuf, const char *prefix)
+ struct ctdlroom *qrbuf, const char *prefix)
{
snprintf(buf, n, "./%s/%ld", prefix, qrbuf->QRnumber);
}
/*
* Back end processing to delete a room and everything associated with it
*/
-void delete_room(struct room *qrbuf)
+void delete_room(struct ctdlroom *qrbuf)
{
struct floor flbuf;
char filename[100];
/*
* Check access control for deleting a room
*/
-int CtdlDoIHavePermissionToDeleteThisRoom(struct room *qr) {
+int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr) {
if ((!(CC->logged_in)) && (!(CC->internal_pgm))) {
return(0);
int avoid_access)
{
- struct room qrbuf;
+ struct ctdlroom qrbuf;
struct floor flbuf;
struct visit vbuf;
}
- memset(&qrbuf, 0, sizeof(struct room));
+ memset(&qrbuf, 0, sizeof(struct ctdlroom));
safestrncpy(qrbuf.QRpasswd, new_room_pass, sizeof qrbuf.QRpasswd);
qrbuf.QRflags = QR_INUSE;
if (new_room_type > 0)
/* $Id$ */
-int is_known (struct room *roombuf, int roomnum,
- struct user *userbuf);
-int has_newmsgs (struct room *roombuf, int roomnum,
- struct user *userbuf);
-int is_zapped (struct room *roombuf, int roomnum,
- struct user *userbuf);
-int getroom(struct room *qrbuf, char *room_name);
-void b_putroom(struct room *qrbuf, char *room_name);
-void putroom(struct room *);
+int is_known (struct ctdlroom *roombuf, int roomnum,
+ struct ctdluser *userbuf);
+int has_newmsgs (struct ctdlroom *roombuf, int roomnum,
+ struct ctdluser *userbuf);
+int is_zapped (struct ctdlroom *roombuf, int roomnum,
+ struct ctdluser *userbuf);
+int getroom(struct ctdlroom *qrbuf, char *room_name);
+void b_putroom(struct ctdlroom *qrbuf, char *room_name);
+void putroom(struct ctdlroom *);
void b_deleteroom(char *);
-int lgetroom(struct room *qrbuf, char *room_name);
-void lputroom(struct room *qrbuf);
+int lgetroom(struct ctdlroom *qrbuf, char *room_name);
+void lputroom(struct ctdlroom *qrbuf);
void getfloor (struct floor *flbuf, int floor_num);
struct floor *cgetfloor(int floor_num);
void lgetfloor (struct floor *flbuf, int floor_num);
void cmd_cflr (char *argbuf);
void cmd_kflr (char *argbuf);
void cmd_eflr (char *argbuf);
-void ForEachRoom(void (*CallBack)(struct room *EachRoom, void *out_data),
+void ForEachRoom(void (*CallBack)(struct ctdlroom *EachRoom, void *out_data),
void *in_data);
void assoc_file_name(char *buf, size_t n,
- struct room *qrbuf, const char *prefix);
-void delete_room(struct room *qrbuf);
-void list_roomname(struct room *qrbuf, int ra);
-int is_noneditable(struct room *qrbuf);
-int CtdlRoomAccess(struct room *roombuf, struct user *userbuf);
-int CtdlDoIHavePermissionToDeleteThisRoom(struct room *qr);
+ struct ctdlroom *qrbuf, const char *prefix);
+void delete_room(struct ctdlroom *qrbuf);
+void list_roomname(struct ctdlroom *qrbuf, int ra);
+int is_noneditable(struct ctdlroom *qrbuf);
+int CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf);
+int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr);
int CtdlRenameRoom(char *old_name, char *new_name, int new_floor);
/*
}
-void room_tree_list(struct roomlisting *rp)
+void room_tree_list(struct ctdlroomlisting *rp)
{
static int c = 0;
char rmname[ROOMNAMELEN];
/*
* Room ordering stuff (compare first by floor, then by order)
*/
-int rordercmp(struct roomlisting *r1, struct roomlisting *r2)
+int rordercmp(struct ctdlroomlisting *r1, struct ctdlroomlisting *r2)
{
if ((r1 == NULL) && (r2 == NULL))
return (0);
static void listrms(struct march *listing, int new_only, int floor_only)
{
struct march *mptr;
- struct roomlisting *rl = NULL;
- struct roomlisting *rp;
- struct roomlisting *rs;
+ struct ctdlroomlisting *rl = NULL;
+ struct ctdlroomlisting *rp;
+ struct ctdlroomlisting *rs;
int list_it;
for (mptr = listing; mptr != NULL; mptr = mptr->next) {
list_it = 0;
if (list_it) {
- rp = malloc(sizeof(struct roomlisting));
+ rp = malloc(sizeof(struct ctdlroomlisting));
strncpy(rp->rlname, mptr->march_name, ROOMNAMELEN);
rp->rlflags = mptr->march_flags;
rp->rlfloor = mptr->march_floor;
int rbump = 0;
char raide[USERNAME_SIZE];
char buf[SIZ];
- struct room *attr = NULL;
+ struct ctdlroom *attr = NULL;
struct ExpirePolicy *eptr = NULL;
int r; /* IPC response code */
* This struct holds a list of rooms for client display.
* (oooh, a tree!)
*/
-struct roomlisting {
- struct roomlisting *lnext;
- struct roomlisting *rnext;
+struct ctdlroomlisting {
+ struct ctdlroomlisting *lnext;
+ struct ctdlroomlisting *rnext;
char rlname[ROOMNAMELEN];
unsigned rlflags;
int rlfloor;
{
char buf[SIZ];
char who[USERNAME_SIZE];
- struct user *user = NULL;
+ struct ctdluser *user = NULL;
int newnow = 0;
int r; /* IPC response code */
void enter_config(CtdlIPC *ipc, int mode)
{
char buf[SIZ];
- struct user *user = NULL;
+ struct ctdluser *user = NULL;
int r; /* IPC response code */
r = CtdlIPCGetConfig(ipc, &user, buf);
*/
void cmd_rbio(char *cmdbuf)
{
- struct user ruser;
+ struct ctdluser ruser;
char buf[SIZ];
FILE *fp;
void cmd_lbio(char *cmdbuf) {
char buf[SIZ];
FILE *ls;
- struct user usbuf;
+ struct ctdluser usbuf;
ls=popen("cd ./bio; ls","r");
if (ls==NULL) {
*
* ok
*/
-void ical_write_to_cal(struct user *u, icalcomponent *cal) {
+void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) {
char temp[PATH_MAX];
FILE *fp;
char *ser;
* Grab another user's free/busy times
*/
void ical_freebusy(char *who) {
- struct user usbuf;
+ struct ctdluser usbuf;
char calendar_room_name[ROOMNAMELEN];
char hold_rm[ROOMNAMELEN];
char *serialized_request = NULL;
*/
void ical_create_room(void)
{
- struct room qr;
+ struct ctdlroom qr;
struct visit vbuf;
/* Create the calendar room if it doesn't already exist */
};
-struct roomref {
- struct roomref *next;
+struct ctdlroomref {
+ struct ctdlroomref *next;
long msgnum;
};
struct ValidUser *ValidUserList = NULL;
int messages_purged;
-struct roomref *rr = NULL;
+struct ctdlroomref *rr = NULL;
extern struct CitContext *ContextList;
* First phase of message purge -- gather the locations of messages which
* qualify for purging and write them to a temp file.
*/
-void GatherPurgeMessages(struct room *qrbuf, void *data) {
+void GatherPurgeMessages(struct ctdlroom *qrbuf, void *data) {
struct ExpirePolicy epbuf;
long delnum;
time_t xtime, now;
}
-void AddValidUser(struct user *usbuf, void *data) {
+void AddValidUser(struct ctdluser *usbuf, void *data) {
struct ValidUser *vuptr;
vuptr = (struct ValidUser *)mallok(sizeof(struct ValidUser));
ValidUserList = vuptr;
}
-void AddValidRoom(struct room *qrbuf, void *data) {
+void AddValidRoom(struct ctdlroom *qrbuf, void *data) {
struct ValidRoom *vrptr;
vrptr = (struct ValidRoom *)mallok(sizeof(struct ValidRoom));
ValidRoomList = vrptr;
}
-void DoPurgeRooms(struct room *qrbuf, void *data) {
+void DoPurgeRooms(struct ctdlroom *qrbuf, void *data) {
time_t age, purge_secs;
struct PurgeList *pptr;
struct ValidUser *vuptr;
int PurgeRooms(void) {
struct PurgeList *pptr;
int num_rooms_purged = 0;
- struct room qrbuf;
+ struct ctdlroom qrbuf;
struct ValidUser *vuptr;
char *transcript = NULL;
}
-void do_user_purge(struct user *us, void *data) {
+void do_user_purge(struct ctdluser *us, void *data) {
int purge;
time_t now;
time_t purge_time;
/* stupid recovery routine to re-create missing mailboxen.
* don't enable this.
- struct room qrbuf;
+ struct ctdlroom qrbuf;
char mailboxname[ROOMNAMELEN];
MailboxName(mailboxname, us, MAILROOM);
create_room(mailboxname, 4, "", 0, 1, 1);
void do_fsck_msg(long msgnum, void *userdata) {
- struct roomref *ptr;
+ struct ctdlroomref *ptr;
- ptr = (struct roomref *)mallok(sizeof(struct roomref));
+ ptr = (struct ctdlroomref *)mallok(sizeof(struct ctdlroomref));
ptr->next = rr;
ptr->msgnum = msgnum;
rr = ptr;
}
-void do_fsck_room(struct room *qrbuf, void *data)
+void do_fsck_room(struct ctdlroom *qrbuf, void *data)
{
getroom(&CC->room, qrbuf->QRname);
CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL, do_fsck_msg, NULL);
long msgnum;
struct cdbdata *cdbmsg;
struct MetaData smi;
- struct roomref *ptr;
+ struct ctdlroomref *ptr;
int realcount;
if (CtdlAccessCheck(ac_aide)) return;
int c = 0;
int ok = 0;
int ra = 0;
- struct room QRscratch;
+ struct ctdlroom QRscratch;
int msgs, new;
int floornum;
int roomflags;
* usergoto() formally takes us to the desired room, happily returning
* the number of messages and number of new messages.
*/
- memcpy(&CC->room, &QRscratch, sizeof(struct room));
+ memcpy(&CC->room, &QRscratch, sizeof(struct ctdlroom));
usergoto(NULL, 0, 0, &msgs, &new);
IMAP->selected = 1;
* IMAP "subscribed folder" is equivocated to Citadel "known rooms." This
* may or may not be the desired behavior in the future.
*/
-void imap_lsub_listroom(struct room *qrbuf, void *data) {
+void imap_lsub_listroom(struct ctdlroom *qrbuf, void *data) {
char buf[SIZ];
int ra;
char *pattern;
/*
* Back end for imap_list()
*/
-void imap_list_listroom(struct room *qrbuf, void *data) {
+void imap_list_listroom(struct ctdlroom *qrbuf, void *data) {
char buf[SIZ];
int ra;
char *pattern;
char augmented_roomname[ROOMNAMELEN];
char roomname[ROOMNAMELEN];
int c;
- struct room QRscratch;
+ struct ctdlroom QRscratch;
int ra;
int ok = 0;
/*
* Back end function for imap_rename()
*/
-void imap_rename_backend(struct room *qrbuf, void *data) {
+void imap_rename_backend(struct ctdlroom *qrbuf, void *data) {
char foldername[SIZ];
char newfoldername[SIZ];
char newroomname[ROOMNAMELEN];
* Enter a subscription request
*/
void do_subscribe(char *room, char *email, char *subtype, char *webpage) {
- struct room qrbuf;
+ struct ctdlroom qrbuf;
FILE *ncfp;
char filename[SIZ];
char token[SIZ];
* Enter an unsubscription request
*/
void do_unsubscribe(char *room, char *email, char *webpage) {
- struct room qrbuf;
+ struct ctdlroom qrbuf;
FILE *ncfp;
char filename[SIZ];
char token[SIZ];
* Confirm a subscribe/unsubscribe request.
*/
void do_confirm(char *room, char *token) {
- struct room qrbuf;
+ struct ctdlroom qrbuf;
FILE *ncfp;
char filename[SIZ];
char line_token[SIZ];
/*
* Batch up and send all outbound traffic from the current room
*/
-void network_queue_room(struct room *qrbuf, void *data) {
+void network_queue_room(struct ctdlroom *qrbuf, void *data) {
struct RoomProcList *ptr;
ptr = (struct RoomProcList *) mallok(sizeof (struct RoomProcList));
struct citsmtp { /* Information about the current session */
int command_state;
char helo_node[SIZ];
- struct user vrfy_buffer;
+ struct ctdluser vrfy_buffer;
int vrfy_count;
char vrfy_match[SIZ];
char from[SIZ];
/*
* Back end for smtp_vrfy() command
*/
-void smtp_vrfy_backend(struct user *us, void *data) {
+void smtp_vrfy_backend(struct ctdluser *us, void *data) {
if (!fuzzy_match(us, SMTP->vrfy_match)) {
++SMTP->vrfy_count;
- memcpy(&SMTP->vrfy_buffer, us, sizeof(struct user));
+ memcpy(&SMTP->vrfy_buffer, us, sizeof(struct ctdluser));
}
}
/*
* Back end for smtp_expn() command
*/
-void smtp_expn_backend(struct user *us, void *data) {
+void smtp_expn_backend(struct ctdluser *us, void *data) {
if (!fuzzy_match(us, SMTP->vrfy_match)) {
}
++SMTP->vrfy_count;
- memcpy(&SMTP->vrfy_buffer, us, sizeof(struct user));
+ memcpy(&SMTP->vrfy_buffer, us, sizeof(struct ctdluser));
}
}
* Initialize the SMTP outbound queue
*/
void smtp_init_spoolout(void) {
- struct room qrbuf;
+ struct ctdlroom qrbuf;
/*
* Create the room. This will silently fail if the room already
void do_pre555_user_upgrade(void) {
struct pre555user usbuf;
- struct user newus;
+ struct ctdluser newus;
struct cdbdata *cdbus;
char tempfilename[PATH_MAX];
FILE *fp, *tp;
while (fread(&usbuf, sizeof(struct pre555user), 1, fp) > 0) {
if (strlen(usbuf.fullname) > 0) {
lprintf(9, "Upgrading <%s>\n", usbuf.fullname);
- memset(&newus, 0, sizeof(struct user));
+ memset(&newus, 0, sizeof(struct ctdluser));
newus.uid = usbuf.USuid;
strcpy(newus.password, usbuf.password);
/*
* Back end processing function for cmd_bmbx
*/
-void cmd_bmbx_backend(struct room *qrbuf, void *data) {
+void cmd_bmbx_backend(struct ctdlroom *qrbuf, void *data) {
static struct RoomProcList *rplist = NULL;
struct RoomProcList *ptr;
- struct room qr;
+ struct ctdlroom qr;
/* Lazy programming here. Call this function as a ForEachRoom backend
* in order to queue up the room names, or call it with a null room
/*
* Back end processing function for convert_bbsuid_to_minusone()
*/
-void cbtm_backend(struct user *usbuf, void *data) {
+void cbtm_backend(struct ctdluser *usbuf, void *data) {
static struct UserProcList *uplist = NULL;
struct UserProcList *ptr;
- struct user us;
+ struct ctdluser us;
/* Lazy programming here. Call this function as a ForEachUser backend
* in order to queue up the room names, or call it with a null user
char artv_tempfilename2[PATH_MAX];
FILE *artv_global_message_list;
-void artv_export_users_backend(struct user *usbuf, void *data) {
+void artv_export_users_backend(struct ctdluser *usbuf, void *data) {
cprintf("user\n");
cprintf("%d\n", usbuf->version);
cprintf("%ld\n", (long)usbuf->uid);
}
-void artv_export_rooms_backend(struct room *qrbuf, void *data) {
+void artv_export_rooms_backend(struct ctdlroom *qrbuf, void *data) {
cprintf("room\n");
cprintf("%s\n", qrbuf->QRname);
cprintf("%s\n", qrbuf->QRpasswd);
void artv_import_user(void) {
char buf[SIZ];
- struct user usbuf;
+ struct ctdluser usbuf;
client_gets(buf); usbuf.version = atoi(buf);
client_gets(buf); usbuf.uid = atoi(buf);
void artv_import_room(void) {
char buf[SIZ];
- struct room qrbuf;
+ struct ctdlroom qrbuf;
long msgnum;
int msgcount = 0;
char *ptr;
int linelen;
char buf[SIZ];
- struct user usbuf;
+ struct ctdluser usbuf;
long what_user;
if (!CC->logged_in) return(0); /* Only do this if logged in. */
if (what_user == CC->user.usernum) {
/* It's the logged in user. That was easy. */
memcpy(&usbuf, &CC->user,
- sizeof(struct user) );
+ sizeof(struct ctdluser) );
}
else if (getuserbynumber(&usbuf, what_user) == 0) {
* If this user has a vcard on disk, read it into memory, otherwise allocate
* and return an empty vCard.
*/
-struct vCard *vcard_get_user(struct user *u) {
+struct vCard *vcard_get_user(struct ctdluser *u) {
char hold_rm[ROOMNAMELEN];
char config_rm[ROOMNAMELEN];
struct CtdlMessage *msg;
/*
* Write our config to disk
*/
-void vcard_write_user(struct user *u, struct vCard *v) {
+void vcard_write_user(struct ctdluser *u, struct vCard *v) {
char temp[PATH_MAX];
FILE *fp;
char *ser;
*/
void cmd_greg(char *argbuf)
{
- struct user usbuf;
+ struct ctdluser usbuf;
struct vCard *v;
char *s;
char who[SIZ];
struct CitContext {
struct CitContext *next; /* Link to next session in the list */
- struct user user; /* Database record buffers */
- struct room room;
+ struct ctdluser user; /* Database record buffers */
+ struct ctdlroom room;
int state; /* thread state (see CON_ values below) */
int kill_me; /* Set to nonzero to flag for termination */
USER RELATED FUNCTIONS
----------------------
- The fundamental user data is stored in "struct user" which is defined
+ The fundamental user data is stored in "struct ctdluser" which is defined
in citadel.h. The following functions are available:
- int getuser(struct user *usbuf, char name[])
+ int getuser(struct ctdluser *usbuf, char name[])
Given the name of a requested user and a buffer to store the user
record in, getuser() will search the userlog for the named user and load its
code if the requested operation could not be performed.
- void putuser(struct user *usbuf, char *name)
+ void putuser(struct ctdluser *usbuf, char *name)
After reading in a user record with getuser() and perhaps modifying the data
in some way, a program may use putuser() to write it back to disk.
- int lgetuser(struct user *usbuf, char *name)
- void lputuser(struct user *usbuf, char *name)
+ int lgetuser(struct ctdluser *usbuf, char *name)
+ void lputuser(struct ctdluser *usbuf, char *name)
If critical-section operation is required, this pair of calls may be used.
They function the same as getuser() and putuser(), except that lgetuser()
entire server.
- void ForEachUser(void (*CallBack)(struct user *EachUser))
+ void ForEachUser(void (*CallBack)(struct ctdluser *EachUser))
This allows a user-supplied function to be called once for each user on
the system. The user-supplied function will be called with a pointer to a
user structure as its only argument.
- int getuserbynumber(struct user *usbuf, long int number)
+ int getuserbynumber(struct ctdluser *usbuf, long int number)
getuserbynumber() functions similarly to getuser(), except that it is
supplied with a user number rather than a name. Calling this function
FUNCTIONS WHICH MANIPULATE USER/ROOM RELATIONSHIPS
void CtdlGetRelationship(struct visit *vbuf,
- struct user *rel_user,
- struct room *rel_room);
+ struct ctdluser *rel_user,
+ struct ctdlroom *rel_room);
void CtdlSetRelationship(struct visit *newvisit,
- struct user *rel_user,
- struct room *rel_room);
+ struct ctdluser *rel_user,
+ struct ctdlroom *rel_room);
These functions get/set a "struct visit" structure which may contain
information about the relationship between a user and a room. Specifically:
- int CtdlRoomAccess(struct room *roombuf, struct user *userbuf)
+ int CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf)
This is a convenience function which uses CtdlGetRelationship() to determine
whether a user has access to a room. It returns a bucket of bits which may
user name (translated to lower case for indexing purposes). The records in
this file look something like this:
-struct user { /* User record */
+struct ctdluser { /* User record */
int version; /* Cit vers. which created this rec */
uid_t uid; /* Associate with a unix account? */
char password[32]; /* password (for BBS-only users) */
system, public or private or mailbox. It's indexed by room name (also in
lower case for easy indexing) and it contains records which look like this:
-struct room {
+struct ctdlroom {
char QRname[ROOMNAMELEN]; /* Name of room */
char QRpasswd[10]; /* Only valid if it's a private rm */
long QRroomaide; /* User number of room aide */
* getuser() - retrieve named user into supplied buffer.
* returns 0 on success
*/
-int getuser(struct user *usbuf, char name[])
+int getuser(struct ctdluser *usbuf, char name[])
{
char lowercase_name[USERNAME_SIZE];
struct cdbdata *cdbus;
int using_sysuser = 0;
- memset(usbuf, 0, sizeof(struct user));
+ memset(usbuf, 0, sizeof(struct ctdluser));
#ifdef ENABLE_AUTOLOGIN
if (CtdlAssociateSystemUser(sysuser_name, name) == 0) {
return(1);
}
memcpy(usbuf, cdbus->ptr,
- ((cdbus->len > sizeof(struct user)) ?
- sizeof(struct user) : cdbus->len));
+ ((cdbus->len > sizeof(struct ctdluser)) ?
+ sizeof(struct ctdluser) : cdbus->len));
cdb_free(cdbus);
return (0);
/*
* lgetuser() - same as getuser() but locks the record
*/
-int lgetuser(struct user *usbuf, char *name)
+int lgetuser(struct ctdluser *usbuf, char *name)
{
int retcode;
/*
* putuser() - write user buffer into the correct place on disk
*/
-void putuser(struct user *usbuf)
+void putuser(struct ctdluser *usbuf)
{
char lowercase_name[USERNAME_SIZE];
int a;
usbuf->version = REV_LEVEL;
cdb_store(CDB_USERS,
lowercase_name, strlen(lowercase_name),
- usbuf, sizeof(struct user));
+ usbuf, sizeof(struct ctdluser));
}
/*
* lputuser() - same as putuser() but locks the record
*/
-void lputuser(struct user *usbuf)
+void lputuser(struct ctdluser *usbuf)
{
putuser(usbuf);
end_critical_section(S_USERS);
* Define a relationship between a user and a room
*/
void CtdlSetRelationship(struct visit *newvisit,
- struct user *rel_user,
- struct room *rel_room)
+ struct ctdluser *rel_user,
+ struct ctdlroom *rel_room)
{
* Locate a relationship between a user and a room
*/
void CtdlGetRelationship(struct visit *vbuf,
- struct user *rel_user,
- struct room *rel_room)
+ struct ctdluser *rel_user,
+ struct ctdlroom *rel_room)
{
char IndexBuf[32];
}
-void MailboxName(char *buf, size_t n, const struct user *who, const char *prefix)
+void MailboxName(char *buf, size_t n, const struct ctdluser *who, const char *prefix)
{
snprintf(buf, n, "%010ld.%s", who->usernum, prefix);
}
* WARNING: don't use this function unless you absolutely have to. It does
* a sequential search and therefore is computationally expensive.
*/
-int getuserbynumber(struct user *usbuf, long int number)
+int getuserbynumber(struct ctdluser *usbuf, long int number)
{
struct cdbdata *cdbus;
cdb_rewind(CDB_USERS);
while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
- memset(usbuf, 0, sizeof(struct user));
+ memset(usbuf, 0, sizeof(struct ctdluser));
memcpy(usbuf, cdbus->ptr,
- ((cdbus->len > sizeof(struct user)) ?
- sizeof(struct user) : cdbus->len));
+ ((cdbus->len > sizeof(struct ctdluser)) ?
+ sizeof(struct ctdluser) : cdbus->len));
cdb_free(cdbus);
if (usbuf->usernum == number) {
cdb_close_cursor(CDB_USERS);
int purge_user(char pname[])
{
char filename[64];
- struct user usbuf;
+ struct ctdluser usbuf;
char lowercase_name[USERNAME_SIZE];
int a;
struct CitContext *ccptr;
*/
int create_user(char *newusername, int become_user)
{
- struct user usbuf;
- struct room qrbuf;
+ struct ctdluser usbuf;
+ struct ctdlroom qrbuf;
struct passwd *p = NULL;
char username[SIZ];
char mailboxname[ROOMNAMELEN];
}
/* Go ahead and initialize a new user record */
- memset(&usbuf, 0, sizeof(struct user));
+ memset(&usbuf, 0, sizeof(struct ctdluser));
strcpy(usbuf.fullname, username);
strcpy(usbuf.password, "");
usbuf.uid = uid;
if (become_user) {
/* Now become the user we just created */
- memcpy(&CC->user, &usbuf, sizeof(struct user));
+ memcpy(&CC->user, &usbuf, sizeof(struct ctdluser));
strcpy(CC->curr_user, username);
CC->logged_in = 1;
void cmd_invt_kick(char *iuser, int op)
/* user name */
{ /* 1 = invite, 0 = kick out */
- struct user USscratch;
+ struct ctdluser USscratch;
char bbb[SIZ];
struct visit vbuf;
void cmd_gnur(void)
{
struct cdbdata *cdbus;
- struct user usbuf;
+ struct ctdluser usbuf;
if (CtdlAccessCheck(ac_aide)) {
return;
*/
cdb_rewind(CDB_USERS);
while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
- memset(&usbuf, 0, sizeof(struct user));
+ memset(&usbuf, 0, sizeof(struct ctdluser));
memcpy(&usbuf, cdbus->ptr,
- ((cdbus->len > sizeof(struct user)) ?
- sizeof(struct user) : cdbus->len));
+ ((cdbus->len > sizeof(struct ctdluser)) ?
+ sizeof(struct ctdluser) : cdbus->len));
cdb_free(cdbus);
if ((usbuf.flags & US_NEEDVALID)
&& (usbuf.axlevel > 0)) {
{
char user[SIZ];
int newax;
- struct user userbuf;
+ struct ctdluser userbuf;
extract(user, v_args, 0);
newax = extract_int(v_args, 1);
/*
* Traverse the user file...
*/
-void ForEachUser(void (*CallBack) (struct user * EachUser, void *out_data),
+void ForEachUser(void (*CallBack) (struct ctdluser * EachUser, void *out_data),
void *in_data)
{
- struct user usbuf;
+ struct ctdluser usbuf;
struct cdbdata *cdbus;
cdb_rewind(CDB_USERS);
while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
- memset(&usbuf, 0, sizeof(struct user));
+ memset(&usbuf, 0, sizeof(struct ctdluser));
memcpy(&usbuf, cdbus->ptr,
- ((cdbus->len > sizeof(struct user)) ?
- sizeof(struct user) : cdbus->len));
+ ((cdbus->len > sizeof(struct ctdluser)) ?
+ sizeof(struct ctdluser) : cdbus->len));
cdb_free(cdbus);
(*CallBack) (&usbuf, in_data);
}
/*
* List one user (this works with cmd_list)
*/
-void ListThisUser(struct user *usbuf, void *data)
+void ListThisUser(struct ctdluser *usbuf, void *data)
{
if (usbuf->axlevel > 0) {
if ((CC->user.axlevel >= 6)
*/
void cmd_qusr(char *who)
{
- struct user usbuf;
+ struct ctdluser usbuf;
if (getuser(&usbuf, who) == 0) {
cprintf("%d %s\n", CIT_OK, usbuf.fullname);
*/
void cmd_agup(char *cmdbuf)
{
- struct user usbuf;
+ struct ctdluser usbuf;
char requested_user[SIZ];
if (CtdlAccessCheck(ac_aide)) {
*/
void cmd_asup(char *cmdbuf)
{
- struct user usbuf;
+ struct ctdluser usbuf;
char requested_user[SIZ];
char notify[SIZ];
int np;
int num_newmsgs = 0;
int a;
char mailboxname[ROOMNAMELEN];
- struct room mailbox;
+ struct ctdlroom mailbox;
struct visit vbuf;
struct cdbdata *cdbfr;
long *msglist = NULL;
/* $Id$ */
int hash (char *str);
-int getuser (struct user *, char *);
-int lgetuser (struct user *, char *);
-void putuser (struct user *);
-void lputuser (struct user *);
+int getuser (struct ctdluser *, char *);
+int lgetuser (struct ctdluser *, char *);
+void putuser (struct ctdluser *);
+void lputuser (struct ctdluser *);
int is_aide (void);
int is_room_aide (void);
-int getuserbynumber (struct user *usbuf, long int number);
+int getuserbynumber (struct ctdluser *usbuf, long int number);
void cmd_user (char *cmdbuf);
void session_startup (void);
void logout (struct CitContext *who);
void cmd_forg (void);
void cmd_gnur (void);
void cmd_vali (char *v_args);
-void ForEachUser(void (*CallBack)(struct user *EachUser, void *out_data),
+void ForEachUser(void (*CallBack)(struct ctdluser *EachUser, void *out_data),
void *in_data);
-void ListThisUser(struct user *usbuf, void *data);
+void ListThisUser(struct ctdluser *usbuf, void *data);
void cmd_list (void);
void cmd_chek (void);
void cmd_qusr (char *who);
int InitialMailCheck(void);
void put_visit(struct visit *newvisit);
void CtdlGetRelationship(struct visit *vbuf,
- struct user *rel_user,
- struct room *rel_room);
+ struct ctdluser *rel_user,
+ struct ctdlroom *rel_room);
void CtdlSetRelationship(struct visit *newvisit,
- struct user *rel_user,
- struct room *rel_room);
-void MailboxName(char *buf, size_t n, const struct user *who,
+ struct ctdluser *rel_user,
+ struct ctdlroom *rel_room);
+void MailboxName(char *buf, size_t n, const struct ctdluser *who,
const char *prefix);
int GenerateRelationshipIndex( char *IndexBuf,
long RoomID,