Moved to new module init structure.
[citadel.git] / citadel / policy.c
index 409ffe66a101d39c0c6a69fb59a8bc6f57bab11d..804416e71df443932841ac0627b12041445c7ff9 100644 (file)
@@ -4,10 +4,6 @@
  * Functions which manage policy for rooms (such as message expiry)
  */
 
-#ifdef DLL_EXPORT
-#define IN_LIBCIT
-#endif
-
 #include "sysdep.h"
 #include <stdlib.h>
 #include <unistd.h>
@@ -30,7 +26,6 @@
 #include "citadel.h"
 #include "server.h"
 #include "database.h"
-#include "serv_extensions.h"
 #include "config.h"
 #include "room_ops.h"
 #include "sysdep_decls.h"
@@ -86,9 +81,9 @@ void GetExpirePolicy(struct ExpirePolicy *epbuf, struct ctdlroom *qrbuf) {
 void cmd_gpex(char *argbuf) {
        struct ExpirePolicy exp;
        struct floor *fl;
-       char which[SIZ];
+       char which[128];
 
-       extract(which, argbuf, 0);
+       extract_token(which, argbuf, 0, '|', sizeof which);
        if (!strcasecmp(which, "room")) {
                memcpy(&exp, &CC->room.QRep, sizeof(struct ExpirePolicy));
        }
@@ -117,10 +112,10 @@ void cmd_gpex(char *argbuf) {
 void cmd_spex(char *argbuf) {
        struct ExpirePolicy exp;
        struct floor flbuf;
-       char which[SIZ];
+       char which[128];
 
        memset(&exp, 0, sizeof(struct ExpirePolicy));
-       extract(which, argbuf, 0);
+       extract_token(which, argbuf, 0, '|', sizeof which);
        exp.expire_mode = extract_int(argbuf, 1);
        exp.expire_value = extract_int(argbuf, 2);
 
@@ -138,7 +133,7 @@ void cmd_spex(char *argbuf) {
                lgetroom(&CC->room, CC->room.QRname);
                memcpy(&CC->room.QRep, &exp, sizeof(struct ExpirePolicy));
                lputroom(&CC->room);
-               cprintf("%d Room expire policy set.\n", CIT_OK);
+               cprintf("%d Room expire policy has been updated.\n", CIT_OK);
                return;
        }
 
@@ -152,7 +147,7 @@ void cmd_spex(char *argbuf) {
                lgetfloor(&flbuf, CC->room.QRfloor);
                memcpy(&flbuf.f_ep, &exp, sizeof(struct ExpirePolicy));
                lputfloor(&flbuf, CC->room.QRfloor);
-               cprintf("%d Floor expire policy set.\n", CIT_OK);
+               cprintf("%d Floor expire policy has been updated.\n", CIT_OK);
                return;
        }
 
@@ -172,7 +167,7 @@ void cmd_spex(char *argbuf) {
                }
                memcpy(&config.c_ep, &exp, sizeof(struct ExpirePolicy));
                put_config();
-               cprintf("%d Site expire policy set.\n", CIT_OK);
+               cprintf("%d Site expire policy has been updated.\n", CIT_OK);
                return;
        }