From: Art Cancro Date: Sun, 1 Nov 1998 23:48:12 +0000 (+0000) Subject: serv_upgrade.c: cosmetic changes X-Git-Tag: v7.86~8208 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=16a115ad6ee1caaf842d1db5e99e6d5fa0d130ec;p=citadel.git serv_upgrade.c: cosmetic changes --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 282b119b5..7dc1e8edc 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,3 +1,6 @@ +Sun Nov 1 18:47:42 EST 1998 Art Cancro + * serv_upgrade.c: cosmetic changes + 1998-11-01 Nathan Bryant * serv_upgrade.c: warning fixes diff --git a/citadel/database.c b/citadel/database.c index b7127fca5..8b0943c3d 100644 --- a/citadel/database.c +++ b/citadel/database.c @@ -135,7 +135,7 @@ void close_databases(void) { /* Hmm... we should decide when would be a good time to defrag. * Server shutdowns might be an opportune time. */ - defrag_databases(); + /* defrag_databases(); */ for (a=0; a #include #include @@ -31,16 +38,15 @@ FILE *imfp; #define MODULE_AUTHOR "Art Cancro" #define MODULE_EMAIL "ajc@uncnsrd.mt-kisco.ny.us" #define MAJOR_VERSION 0 -#define MINOR_VERSION 2 +#define MINOR_VERSION 3 static struct DLModule_Info info = { - MODULE_NAME, - MODULE_AUTHOR, - MODULE_EMAIL, - MAJOR_VERSION, - MINOR_VERSION -}; - + MODULE_NAME, + MODULE_AUTHOR, + MODULE_EMAIL, + MAJOR_VERSION, + MINOR_VERSION + }; @@ -143,7 +149,7 @@ void imp_rooms(void) { if (!strcasecmp(tag, "qrname")) { strcpy(qr.QRname, tval); - lprintf(9, "<%s>", qr.QRname); + lprintf(9, "<%s> ", qr.QRname); } if (!strcasecmp(tag, "qrpasswd")) strcpy(qr.QRpasswd, tval); @@ -162,7 +168,6 @@ void imp_rooms(void) { if (!strcasecmp(tag, "qrfloor")) qr.QRfloor = atoi(tval); if (!strcasecmp(tag, "message")) { - lprintf(9, "."); fpgetfield(imfp, tval); msgnum = atol(tval); fpgetfield(imfp, tval); @@ -176,7 +181,7 @@ void imp_rooms(void) { } - lprintf(9, "\n"); + lprintf(9, "(%d messages)\n", num_msgs); if ((roomnum!=1)&&(qr.QRflags&QR_INUSE)) { putroom(&qr, qr.QRname); } @@ -204,14 +209,13 @@ void imp_rooms(void) { - - void import_a_user(void) { char key[256], value[256]; char vkey[256], vvalue[256]; struct usersupp us; struct quickroom qr; struct visit vbuf; + int visits = 0; bzero(&us, sizeof(struct usersupp)); while(fpgetfield(imfp, key), strcasecmp(key, "enduser")) { @@ -237,7 +241,7 @@ void import_a_user(void) { us.posted = atoi(value); if (!strcasecmp(key, "fullname")) { strcpy(us.fullname, value); - lprintf(9, "User <%s>", us.fullname); + lprintf(9, "User <%s> ", us.fullname); } if (!strcasecmp(key, "axlevel")) us.axlevel = atoi(value); @@ -245,8 +249,10 @@ void import_a_user(void) { us.USscreenwidth = atoi(value); if (!strcasecmp(key, "usscreenheight")) us.USscreenheight = atoi(value); - if (!strcasecmp(key, "usernum")) + if (!strcasecmp(key, "usernum")) { us.usernum = atol(value); + lprintf(9, "<#%ld> ", us.usernum); + } if (!strcasecmp(key, "lastcall")) us.lastcall = atol(value); if (!strcasecmp(key, "usname")) @@ -264,7 +270,7 @@ void import_a_user(void) { if (!strcasecmp(key, "usemail")) strcpy(us.USemail, value); if (!strcasecmp(key, "visit")) { - lprintf(9,"v"); + ++visits; bzero(&vbuf, sizeof(struct visit)); bzero(&qr, sizeof(struct quickroom)); while(fpgetfield(imfp, vkey), @@ -287,7 +293,7 @@ void import_a_user(void) { putuser(&us, us.fullname); - lprintf(9, "\n"); + lprintf(9, "(%d rooms)\n", visits); } @@ -301,7 +307,6 @@ void imp_usersupp(void) { else { strcpy(value, ""); } - lprintf(9, " %s = %s\n", key, value); if (!strcasecmp(key, "user")) { import_a_user(); @@ -310,9 +315,6 @@ void imp_usersupp(void) { } - - - void imp_globals(void) { char key[256], value[256]; @@ -460,13 +462,17 @@ void do_import(char *argbuf) { } import_databases(); - cprintf("%d ok\n", OK); + lprintf(9, "Defragmenting databases (this may take a while)...\n"); + defrag_databases(); + lprintf(1, "Import is finished. Shutting down Citadel...\n"); + cprintf("%d Import finished. Shutting down Citadel...\n", OK); + master_cleanup(); } struct DLModule_Info *Dynamic_Module_Init(void) { CtdlRegisterProtoHook(do_import, "IMPO", - "Import an unpacked Cit5"); + "Import an unpacked system"); return &info; }