diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-09-25 13:39:17 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-09-25 13:39:17 +0800 |
commit | 7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90 (patch) | |
tree | 2e0f13a0d82600814e9a8480cb9ac13ccd7a2c71 | |
parent | c4a8f8510d103417523fe86c06d74d8e5909a508 (diff) | |
download | pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.tar pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.tar.gz pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.tar.bz2 pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.tar.lz pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.tar.xz pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.tar.zst pttbbs-7f31f0a35cad5a5bfeec7bbd791eabed5f0dad90.zip |
add log to Lock/unlock file
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3430 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 2d4c30d5..d3adb195 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -501,7 +501,7 @@ cancelpost(const fileheader_t *fh, int by_BM, char *newpath) char *ptr, *brd; fileheader_t postfile; char genbuf[200]; - char nick[STRLEN], fn1[STRLEN]; + char nick[STRLEN], fn1[MAXPATHLEN]; int len = 42-strlen(currboard); struct tm *ptime = localtime4(&now); @@ -2669,13 +2669,25 @@ show_filename(int ent, const fileheader_t * fhdr, const char *direct) static int lock_post(int ent, fileheader_t * fhdr, const char *direct) { + char fn1[MAXPATHLEN]; + struct tm *ptime = localtime4(&now); if(!(currmode & MODE_BOARD) && !HasUserPerm(PERM_SYSOP | PERM_POLICE)) return DONOTHING; if(fhdr->filename[0]=='M') + { + setbfile(fn1, currboard, fhdr->filename); fhdr->filename[0] = 'L'; + log_file(fn1, LOG_CREAT | LOG_VF, "\n¡° Locked by: %s (%s) %d/%d", + cuser.userid, fromhost, ptime->tm_mon + 1, ptime->tm_mday); + } else if(fhdr->filename[0]=='L') + { fhdr->filename[0] = 'M'; + setbfile(fn1, currboard, fhdr->filename); + log_file(fn1, LOG_CREAT | LOG_VF, "\n¡° Unlocked by: %s (%s) %d/%d", + cuser.userid, fromhost, ptime->tm_mon + 1, ptime->tm_mday); + } substitute_ref_record(direct, fhdr, ent); return FULLUPDATE; } |