From 9ebb85903a663784e5d305fc08095e5713726a01 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 28 Mar 2007 20:19:02 +0000 Subject: [PATCH] * Implemented support for the new 'anyone can delete' flag --- webcit/configure.ac | 2 +- webcit/messages.c | 2 +- webcit/roomops.c | 36 +++++++++++++++++++++++++++++------- webcit/webcit.h | 8 +++++--- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/webcit/configure.ac b/webcit/configure.ac index d0af2ee79..6159ef0d8 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -4,7 +4,7 @@ AC_INIT(webserver.c) PACKAGE=webcit -VERSION=7.06 +VERSION=7.07 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) diff --git a/webcit/messages.c b/webcit/messages.c index d4e3be21c..3bba9f7e9 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -972,7 +972,7 @@ void read_message(long msgnum, int printable_view, char *section) { } /** If this is one of my own rooms, or if I'm an Aide or Room Aide, I can move/delete */ - if ( (WC->is_room_aide) || (WC->is_mailbox) ) { + if ( (WC->is_room_aide) || (WC->is_mailbox) || (WC->room_flags2 & QR2_COLLABDEL) ) { /** Move */ wprintf("[%s] ", msgnum, _("Move")); diff --git a/webcit/roomops.c b/webcit/roomops.c index f71830a61..6c7adfd35 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -197,7 +197,6 @@ void listrms(char *variety) struct roomlisting *rp; struct roomlisting *rs; - /** Ask the server for a room list */ serv_puts(variety); serv_getln(buf, sizeof buf); @@ -205,6 +204,7 @@ void listrms(char *variety) wprintf(" "); return; } + while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { ++num_rooms; rp = malloc(sizeof(struct roomlisting)); @@ -741,6 +741,7 @@ int gotoroom(char *gname) WC->wc_view = extract_int(&buf[4], 11); WC->wc_default_view = extract_int(&buf[4], 12); WC->wc_is_trash = extract_int(&buf[4], 13); + WC->room_flags2 = extract_int(&buf[4], 14); if (WC->is_aide) WC->is_room_aide = WC->is_aide; @@ -992,15 +993,16 @@ int self_service(int newval) { void display_editroom(void) { char buf[SIZ]; - char cmd[SIZ]; - char node[SIZ]; - char remote_room[SIZ]; - char recp[SIZ]; + char cmd[1024]; + char node[256]; + char remote_room[128]; + char recp[1024]; char er_name[128]; char er_password[10]; char er_dirname[15]; char er_roomaide[26]; unsigned er_flags; + unsigned er_flags2; int er_floor; int i, j; char *tab; @@ -1028,6 +1030,7 @@ void display_editroom(void) extract_token(er_dirname, &buf[4], 2, '|', sizeof er_dirname); er_flags = extract_int(&buf[4], 3); er_floor = extract_int(&buf[4], 4); + er_flags2 = extract_int(&buf[4], 7); output_headers(1, 1, 1, 0, 0, 0); @@ -1236,6 +1239,12 @@ void display_editroom(void) wprintf("> "); wprintf(_("Read-only room")); + wprintf("\n
  • "); + wprintf(_("All users allowed to post may also delete messages")); + /** directory stuff */ wprintf("\n