From 8e38fd42f89dfcfd87b6f76de0178d0e7d8555e9 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 21 Feb 2006 18:15:18 +0000 Subject: [PATCH] All of the 'list rooms' commands now enumerate not only the current view for a room, but also the default view. Incremented the internal version number to 6.73 --- citadel/citadel.h | 4 ++-- citadel/room_ops.c | 19 ++++++++++--------- citadel/room_ops.h | 2 +- citadel/techdoc/protocol.txt | 1 + 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index a14ac9d10..90a4ef70d 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -33,7 +33,7 @@ extern "C" { /* * Text description of this software */ -#define CITADEL "Citadel 6.72" +#define CITADEL "Citadel 6.73" /* * REV_LEVEL is the current version number (multiplied by 100 to avoid having @@ -45,7 +45,7 @@ extern "C" { * usually more strict because you're not really supposed to dump/load and * upgrade at the same time. */ -#define REV_LEVEL 672 /* This version */ +#define REV_LEVEL 673 /* This version */ #define REV_MIN 591 /* Oldest compatible database */ #define EXPORT_REV_MIN 655 /* Oldest compatible export files */ diff --git a/citadel/room_ops.c b/citadel/room_ops.c index a0fd86880..b96c73a10 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -503,7 +503,7 @@ int is_noneditable(struct ctdlroom *qrbuf) /* * Back-back-end for all room listing commands */ -void list_roomname(struct ctdlroom *qrbuf, int ra, int view) +void list_roomname(struct ctdlroom *qrbuf, int ra, int current_view, int default_view) { char truncated_roomname[ROOMNAMELEN]; @@ -520,13 +520,14 @@ void list_roomname(struct ctdlroom *qrbuf, int ra, int view) } /* ...and now the other parameters */ - cprintf("|%u|%d|%d|%d|%d|%d|\n", + cprintf("|%u|%d|%d|%d|%d|%d|%d|\n", qrbuf->QRflags, (int) qrbuf->QRfloor, (int) qrbuf->QRorder, (int) qrbuf->QRflags2, ra, - view + current_view, + default_view ); } @@ -546,7 +547,7 @@ void cmd_lrms_backend(struct ctdlroom *qrbuf, void *data) if ((( ra & (UA_KNOWN | UA_ZAPPED))) && ((qrbuf->QRfloor == (FloorBeingSearched)) || ((FloorBeingSearched) < 0))) - list_roomname(qrbuf, ra, view); + list_roomname(qrbuf, ra, view, qrbuf->QRdefaultview); } void cmd_lrms(char *argbuf) @@ -584,7 +585,7 @@ void cmd_lkra_backend(struct ctdlroom *qrbuf, void *data) if ((( ra & (UA_KNOWN))) && ((qrbuf->QRfloor == (FloorBeingSearched)) || ((FloorBeingSearched) < 0))) - list_roomname(qrbuf, ra, view); + list_roomname(qrbuf, ra, view, qrbuf->QRdefaultview); } void cmd_lkra(char *argbuf) @@ -620,7 +621,7 @@ void cmd_lprm_backend(struct ctdlroom *qrbuf, void *data) && ((qrbuf->QRflags & QR_MAILBOX) == 0) && ((qrbuf->QRfloor == (FloorBeingSearched)) || ((FloorBeingSearched) < 0))) - list_roomname(qrbuf, ra, view); + list_roomname(qrbuf, ra, view, qrbuf->QRdefaultview); } void cmd_lprm(char *argbuf) @@ -653,7 +654,7 @@ void cmd_lkrn_backend(struct ctdlroom *qrbuf, void *data) && (ra & UA_HASNEWMSGS) && ((qrbuf->QRfloor == (FloorBeingSearched)) || ((FloorBeingSearched) < 0))) - list_roomname(qrbuf, ra, view); + list_roomname(qrbuf, ra, view, qrbuf->QRdefaultview); } void cmd_lkrn(char *argbuf) @@ -692,7 +693,7 @@ void cmd_lkro_backend(struct ctdlroom *qrbuf, void *data) && ((ra & UA_HASNEWMSGS) == 0) && ((qrbuf->QRfloor == (FloorBeingSearched)) || ((FloorBeingSearched) < 0))) - list_roomname(qrbuf, ra, view); + list_roomname(qrbuf, ra, view, qrbuf->QRdefaultview); } void cmd_lkro(char *argbuf) @@ -731,7 +732,7 @@ void cmd_lzrm_backend(struct ctdlroom *qrbuf, void *data) && (ra & UA_ZAPPED) && ((qrbuf->QRfloor == (FloorBeingSearched)) || ((FloorBeingSearched) < 0))) - list_roomname(qrbuf, ra, view); + list_roomname(qrbuf, ra, view, qrbuf->QRdefaultview); } void cmd_lzrm(char *argbuf) diff --git a/citadel/room_ops.h b/citadel/room_ops.h index 20f2ccae9..135a229ae 100644 --- a/citadel/room_ops.h +++ b/citadel/room_ops.h @@ -51,7 +51,7 @@ void ForEachRoom(void (*CallBack)(struct ctdlroom *EachRoom, void *out_data), void *in_data); void schedule_room_for_deletion(struct ctdlroom *qrbuf); void delete_room(struct ctdlroom *qrbuf); -void list_roomname(struct ctdlroom *qrbuf, int ra, int view); +void list_roomname(struct ctdlroom *qrbuf, int ra, int current_view, int default_view); int is_noneditable(struct ctdlroom *qrbuf); void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, int *result, int *view); diff --git a/citadel/techdoc/protocol.txt b/citadel/techdoc/protocol.txt index f9a200698..be84eb2cb 100644 --- a/citadel/techdoc/protocol.txt +++ b/citadel/techdoc/protocol.txt @@ -292,6 +292,7 @@ room access controls: #define UA_ZAPPED 16 /* Zapped from known rooms list */ The sixth field is the user's current view for the room. (See VIEW command) + The seventh field is the *default* view for the room. (See VIEW command) LKRO (List Known Rooms with Old [no new] messages) -- 2.39.2