]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_vandelay.c
* The EUID index is now built, and replication checks are being performed
[citadel.git] / citadel / serv_vandelay.c
index 922e1dc277cdf97ded7316d57c908775a7f1f015..49f5ed9de98e8e6853d38b38694b06449f827729 100644 (file)
@@ -43,6 +43,7 @@
 #include "user_ops.h"
 #include "room_ops.h"
 #include "control.h"
+#include "euidindex.h"
 
 #define END_OF_MESSAGE "---eom---dbd---"
 
@@ -264,7 +265,7 @@ void artv_do_export(void) {
        cprintf("%s\n", config.c_fqdn);
        cprintf("%s\n", config.c_humannode);
        cprintf("%s\n", config.c_phonenum);
-       cprintf("%ld\n", (long)config.c_bbsuid);
+       cprintf("%ld\n", (long)config.c_ctdluid);
        cprintf("%d\n", config.c_creataide);
        cprintf("%d\n", config.c_sleeping);
        cprintf("%d\n", config.c_initax);
@@ -273,7 +274,7 @@ void artv_do_export(void) {
        cprintf("%s\n", config.c_twitroom);
        cprintf("%s\n", config.c_moreprompt);
        cprintf("%d\n", config.c_restrict);
-       cprintf("%s\n", config.c_bbs_city);
+       cprintf("%s\n", config.c_site_location);
        cprintf("%s\n", config.c_sysadm);
        cprintf("%d\n", config.c_setup_level);
        cprintf("%d\n", config.c_maxsessions);
@@ -302,6 +303,16 @@ void artv_do_export(void) {
        cprintf("%d\n", config.c_imaps_port);
        cprintf("%d\n", config.c_pop3s_port);
        cprintf("%d\n", config.c_smtps_port);
+       cprintf("%d\n", config.c_rfc822_strict_from);
+       cprintf("%d\n", config.c_aide_zap);
+       cprintf("%d\n", config.c_imap_port);
+       cprintf("%ld\n", config.c_net_freq);
+       cprintf("%d\n", config.c_disable_newu);
+       cprintf("%s\n", config.c_baseroom);
+       cprintf("%s\n", config.c_aideroom);
+       cprintf("%d\n", config.c_auto_cull);
+       cprintf("%d\n", config.c_instant_expunge);
+       cprintf("%d\n", config.c_allow_spoofing);
 
        /* Export the control file */
        get_control();
@@ -331,7 +342,7 @@ void artv_import_config(void) {
        client_getln(config.c_fqdn, sizeof config.c_fqdn);
        client_getln(config.c_humannode, sizeof config.c_humannode);
        client_getln(config.c_phonenum, sizeof config.c_phonenum);
-       client_getln(buf, sizeof buf);  config.c_bbsuid = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_ctdluid = atoi(buf);
        client_getln(buf, sizeof buf);  config.c_creataide = atoi(buf);
        client_getln(buf, sizeof buf);  config.c_sleeping = atoi(buf);
        client_getln(buf, sizeof buf);  config.c_initax = atoi(buf);
@@ -340,7 +351,7 @@ void artv_import_config(void) {
        client_getln(config.c_twitroom, sizeof config.c_twitroom);
        client_getln(config.c_moreprompt, sizeof config.c_moreprompt);
        client_getln(buf, sizeof buf);  config.c_restrict = atoi(buf);
-       client_getln(config.c_bbs_city, sizeof config.c_bbs_city);
+       client_getln(config.c_site_location, sizeof config.c_site_location);
        client_getln(config.c_sysadm, sizeof config.c_sysadm);
        client_getln(buf, sizeof buf);  config.c_setup_level = atoi(buf);
        client_getln(buf, sizeof buf);  config.c_maxsessions = atoi(buf);
@@ -369,6 +380,17 @@ void artv_import_config(void) {
        client_getln(buf, sizeof buf);  config.c_imaps_port = atoi(buf);
        client_getln(buf, sizeof buf);  config.c_pop3s_port = atoi(buf);
        client_getln(buf, sizeof buf);  config.c_smtps_port = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_rfc822_strict_from = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_aide_zap = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_imap_port = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_net_freq = atol(buf);
+       client_getln(buf, sizeof buf);  config.c_disable_newu = atoi(buf);
+       client_getln(config.c_baseroom, sizeof config.c_baseroom);
+       client_getln(config.c_aideroom, sizeof config.c_aideroom);
+       client_getln(buf, sizeof buf);  config.c_auto_cull = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_instant_expunge = atoi(buf);
+       client_getln(buf, sizeof buf);  config.c_allow_spoofing = atoi(buf);
+       config.c_enable_fulltext = 0;   /* always disable */
        put_config();
        lprintf(CTDL_INFO, "Imported config file\n");
 }
@@ -384,6 +406,7 @@ void artv_import_control(void) {
        client_getln(buf, sizeof buf);  CitControl.MMnextuser = atol(buf);
        client_getln(buf, sizeof buf);  CitControl.MMnextroom = atol(buf);
        client_getln(buf, sizeof buf);  CitControl.version = atoi(buf);
+       CitControl.MMfulltext = (-1L);  /* always flush */
        put_control();
        lprintf(CTDL_INFO, "Imported control file\n");
 }
@@ -438,7 +461,7 @@ void artv_import_room(void) {
         * one per line terminated by a 0.
         */
        while (client_getln(buf, sizeof buf), msgnum = atol(buf), msgnum > 0) {
-               CtdlSaveMsgPointerInRoom(qrbuf.QRname, msgnum, 0);
+               CtdlSaveMsgPointerInRoom(qrbuf.QRname, msgnum, 0, NULL);
                ++msgcount;
        }
        lprintf(CTDL_INFO, "(%d messages)\n", msgcount);
@@ -568,12 +591,13 @@ void artv_do_import(void) {
        }
        lprintf(CTDL_INFO, "Invalid keyword <%s>.  Flushing input.\n", buf);
        while (client_getln(buf, sizeof buf), strcmp(buf, "000"))  ;;
+       rebuild_euid_index();
 }
 
 
 
 void cmd_artv(char *cmdbuf) {
-       char cmd[SIZ];
+       char cmd[32];
        static int is_running = 0;
 
        if (CtdlAccessCheck(ac_internal)) return;
@@ -587,7 +611,7 @@ void cmd_artv(char *cmdbuf) {
        strcpy(artv_tempfilename1, tmpnam(NULL));
        strcpy(artv_tempfilename2, tmpnam(NULL));
 
-       extract(cmd, cmdbuf, 0);
+       extract_token(cmd, cmdbuf, 0, '|', sizeof cmd);
        if (!strcasecmp(cmd, "export")) artv_do_export();
        else if (!strcasecmp(cmd, "import")) artv_do_import();
        else cprintf("%d illegal command\n", ERROR + ILLEGAL_VALUE);