From 95262b83a086058fc778fff20ac9c7ee76575494 Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 21 Feb 2008 04:28:13 +0000 Subject: - talk: comment on mail_check - cache: better def-style on aggchk - admin: enable showing regform counter git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3933 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/admin.c | 12 +++++++++--- mbbsd/cache.c | 2 +- mbbsd/talk.c | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/admin.c b/mbbsd/admin.c index 68ff5cce..2c9c6475 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1173,7 +1173,7 @@ scan_register_form(const char *regfile, int automode) char fdata[6][STRLEN]; char fname[STRLEN], buf[STRLEN]; char ans[4], *ptr, *uid; - int n = 0, unum = 0; + int n = 0, unum = 0, tid = 0; int nSelf = 0, nAuto = 0; uid = cuser.userid; @@ -1204,6 +1204,7 @@ scan_register_form(const char *regfile, int automode) } } } while( fgets(genbuf, STRLEN, fn) ); + tid ++; if ((unum = getuser(fdata[0], &muser)) == 0) { move(2, 0); @@ -1225,8 +1226,8 @@ scan_register_form(const char *regfile, int automode) user_display(&muser, 1); move(14, 0); prints(ANSI_COLOR(1;32) "------------- " - "請站長嚴格審核使用者資料" - "---------------" ANSI_RESET "\n"); + "請站長嚴格審核使用者資料,這是第 %d 份" + "------------" ANSI_RESET "\n", tid); prints(" %-12s: %s\n", finfo[0], fdata[0]); #ifdef FOREIGN_REG prints("0.%-12s: %s%s\n", finfo[1], fdata[1], @@ -1308,6 +1309,7 @@ scan_register_form(const char *regfile, int automode) mhdr.filemode = 0; sethomedir(title, muser.userid); if (append_record(title, &mhdr, sizeof(mhdr)) != -1) { + char rejfn[PATHLEN]; fp = fopen(buf1, "w"); for(i = 0; buf[i] && i < sizeof(buf); i++){ @@ -1319,6 +1321,10 @@ scan_register_form(const char *regfile, int automode) } fclose(fp); + + // build reject file + setuserfile(rejfn, "justify.reject"); + Copy(buf1, rejfn); } if ((fout = fopen(logfile, "a"))) { for (n = 0; field[n]; n++) diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 6155753c..7df6a49a 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -948,7 +948,7 @@ reload_pttcache(void) #ifdef GLOBAL_NOTE_AGGCHKDIR // TODO aggressive: only count '<點歌>' section - if (strcmp(item.title, GLOBAL_NOTE_AGGCHKDIR) == 0) + if (strcmp(item.title+3, GLOBAL_NOTE_AGGCHKDIR) == 0) chkagg = 1; #endif diff --git a/mbbsd/talk.c b/mbbsd/talk.c index f0fefe41..6e6dea5e 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -3033,6 +3033,8 @@ userlist(void) /* deny reentrance, which may cause many problems */ vmsg("你進入使用者列表前就已經在閱\讀信件了"); } else { + // XXX in fact we should check size here... + // chkmailbox(); m_read(); setutmpmode(LUSERS); } -- cgit v1.2.3