]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_moderate.c
* compatibility with Berkeley DB < 3.3
[citadel.git] / citadel / serv_moderate.c
index 77c210798515592c71d53ea3c267487fd56bb100..7d730ebb63b122a99e31dc694985187246adfbd6 100644 (file)
 #include <pwd.h>
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #include <sys/wait.h>
 #include <string.h>
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include <time.h>
 #include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
@@ -42,7 +52,7 @@
 void cmd_mmod(char *argbuf) {
        long msgnum;
        int newlevel;
-       struct SuppMsgInfo smi;
+       struct MetaData smi;
        int is_message_in_room;
 
        /* user must be at least a Room Aide to moderate */
@@ -58,18 +68,18 @@ void cmd_mmod(char *argbuf) {
        }
 
        is_message_in_room = CtdlForEachMessage(MSGS_EQ, msgnum, (-127),
-                               NULL, NULL, NULL);
+                               NULL, NULL, NULL, NULL);
        if (!is_message_in_room) {
                cprintf("%d Message %ld is not in this room.\n",
                        ERROR+ILLEGAL_VALUE, msgnum);
                return;
        }
 
-       GetSuppMsgInfo(&smi, msgnum);
-       smi.smi_mod = newlevel;
-       PutSuppMsgInfo(&smi);
+       GetMetaData(&smi, msgnum);
+       smi.meta_mod = newlevel;
+       PutMetaData(&smi);
 
-       cprintf("%d Message %ld is moderated to %d\n", OK, msgnum, newlevel);
+       cprintf("%d Message %ld is moderated to %d\n", CIT_OK, msgnum, newlevel);
 }