From: Art Cancro Date: Sat, 24 Oct 1998 00:27:59 +0000 (+0000) Subject: policy X-Git-Tag: v7.86~8240 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=a62fd2f9689b1fe286213bf13a77b42e0f86420d;p=citadel.git policy --- diff --git a/citadel/citserver.c b/citadel/citserver.c index fca92cabb..32d7872a5 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -26,6 +26,7 @@ #include "room_ops.h" #include "file_ops.h" #include "dynloader.h" +#include "policy.h" struct CitContext *ContextList = NULL; int ScheduledShutdown = 0; @@ -1056,6 +1057,14 @@ void *context_loop(struct CitContext *con) cmd_asup(&cmdbuf[5]); } + else if (!strncasecmp(cmdbuf, "GPEX", 4)) { + cmd_gpex(&cmdbuf[5]); + } + + else if (!strncasecmp(cmdbuf, "SPEX", 4)) { + cmd_spex(&cmdbuf[5]); + } + else if (!DLoader_Exec_Cmd(cmdbuf)) { cprintf("%d Unrecognized or unsupported command.\n", diff --git a/citadel/policy.c b/citadel/policy.c index 9ca62e5f1..841736d13 100644 --- a/citadel/policy.c +++ b/citadel/policy.c @@ -43,3 +43,19 @@ void GetExpirePolicy(struct ExpirePolicy *epbuf, struct quickroom *qrbuf) { } +/* + * Get Policy EXpire + */ +void cmd_gpex(char *argbuf) { + cprintf("%d Command not yet implemented.\n", ERROR); + } + + +/* + * Set Policy EXpire + */ +void cmd_spex(char *argbuf) { + cprintf("%d Command not yet implemented.\n", ERROR); + } + + diff --git a/citadel/policy.h b/citadel/policy.h index 2c019f851..387cb2198 100644 --- a/citadel/policy.h +++ b/citadel/policy.h @@ -1 +1,3 @@ void GetExpirePolicy(struct ExpirePolicy *epbuf, struct quickroom *qrbuf); +void cmd_gpex(char *argbuf); +void cmd_spex(char *argbuf); diff --git a/citadel/serv_test.c b/citadel/serv_test.c index 81f000fae..758ce19f5 100644 --- a/citadel/serv_test.c +++ b/citadel/serv_test.c @@ -20,6 +20,7 @@ #include "config.h" #include "dynloader.h" #include "room_ops.h" +#include "policy.h" #include "database.h" extern struct CitContext *ContextList; @@ -100,7 +101,7 @@ void DoPurgeMessages(struct quickroom *qrbuf) { } } - /* If the room is set to expire by age... FIX (write this!!) (/ + /* If the room is set to expire by age... FIX (write this!!) */ if (epbuf.expire_mode == EXPIRE_AGE) { } diff --git a/citadel/techdoc/session.txt b/citadel/techdoc/session.txt index b91ee2d9a..fb32544d6 100644 --- a/citadel/techdoc/session.txt +++ b/citadel/techdoc/session.txt @@ -1585,6 +1585,10 @@ addition, the RWHO listing will include both the spoofed and real usernames. This is used in allowing a client to calculate idle times. +---------------------------------------------- +The following are for citserver 5.11 and above +---------------------------------------------- + AGUP (Administrative Get User Parameters) ASUP (Administrative Set User Parameters) @@ -1607,5 +1611,34 @@ as follows, and are common to both commands: simply returns OK. If the client has insufficient access to perform the requested operation, ERROR+HIGHER_ACCESS_REQUIRED is returned. If the requested user does not exist, ERROR+NO_SUCH_USER is returned. + + + + GPEX (Get Policy for message EXpiration) + + Returns the policy of the current room, floor, or site regarding the automatic +purging (expiration) of messages. The following policies are available: + 0 - Fall back to the policy of the next higher level. If this is a room, + use the floor's default policy. If this is a floor, use the system + default policy. This is an invalid value for the system policy. + 1 - Do not purge messages automatically. + 2 - Purge by message count. (Requires a value: number of messages) + 3 - Purge by message age. (Requires a value: number of days) + + The format of this command is: GPEX + The value of must be one of: "room" "floor" "site" + + If successful, GPEX returns OK followed by |. + + + SPEX (Set Polict for message EXpiration) + + Sets the policy of the current room, floor, or site regarding the automatic +purging (expiration) of messages. See the writeup for the GPEX command for +the list of available policies. + + The format of this command is: SPEX || + The value of must be one of: "room" "floor" "site" + If successful, GPEX returns OK; otherwise, an ERROR code is returned.