policy
authorArt Cancro <ajc@citadel.org>
Sat, 24 Oct 1998 00:27:59 +0000 (00:27 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 24 Oct 1998 00:27:59 +0000 (00:27 +0000)
citadel/citserver.c
citadel/policy.c
citadel/policy.h
citadel/serv_test.c
citadel/techdoc/session.txt

index fca92cabb5e692bac5dc884a117b1fba92c7c63e..32d7872a57e9773e6ebdd18dbebd7b62e69603bd 100644 (file)
@@ -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",
index 9ca62e5f153e10191a43c9a64306fb8595269813..841736d13eb02705ab855098297f024b83f98fe5 100644 (file)
@@ -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);
+       }
+
+
index 2c019f851fc1f3e8f6a61a6eabd71e5d7af9e580..387cb21989ca19cd1cfe308cf5ce78a4c8d121d6 100644 (file)
@@ -1 +1,3 @@
 void GetExpirePolicy(struct ExpirePolicy *epbuf, struct quickroom *qrbuf);
+void cmd_gpex(char *argbuf);
+void cmd_spex(char *argbuf);
index 81f000fae86656d72882313c0792434110aeaa35..758ce19f542995216caf035b35997982dde48453 100644 (file)
@@ -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) {
                }
 
index b91ee2d9ab6fa51ea55377c093d4548ef296f61a..fb32544d665b4240730867544492745b0a0c594f 100644 (file)
@@ -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 <which>
+ The value of <which> must be one of: "room" "floor" "site"
+ If successful, GPEX returns OK followed by <policy>|<value>.
+
 
+
+ 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 <which>|<policy>|<value>
+ The value of <which> must be one of: "room" "floor" "site"
  
+ If successful, GPEX returns OK; otherwise, an ERROR code is returned.