diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-03 20:54:30 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-03 20:54:30 +0800 |
commit | 74ceac39794d1f3744a4c14e0e48d787d538b5d0 (patch) | |
tree | 8f59926ff410f1efd6476df852e3f2492014cced /mbbsd/more.c | |
parent | c910fdb835478291442032bf6523d41949aa68d9 (diff) | |
download | pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.tar pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.tar.gz pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.tar.bz2 pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.tar.lz pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.tar.xz pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.tar.zst pttbbs-74ceac39794d1f3744a4c14e0e48d787d538b5d0.zip |
- re-enable sysop-edit in article list mode
- move sysop-edit log to more instead of pmore body
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3778 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/more.c')
-rw-r--r-- | mbbsd/more.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mbbsd/more.c b/mbbsd/more.c index 0a94d506..40333264 100644 --- a/mbbsd/more.c +++ b/mbbsd/more.c @@ -4,6 +4,26 @@ /* use new pager: piaip's more. */ int more(char *fpath, int promptend) { - return pmore(fpath, promptend); + int r = pmore(fpath, promptend); + + if (r == RET_DOSYSOPEDIT) + { + if (HasUserPerm(PERM_SYSOP) && +#ifdef GLOBAL_SECURITY + strcmp(currboard, GLOBAL_SECURITY) != 0 && +#endif // GLOBAL_SECURITY + strcmp(fpath, "etc/ve.hlp") != 0 && + 1) + { + time4_t t = time4(NULL); + log_filef("log/security", LOG_CREAT, + "%d %24.24s %d %s admin edit file=%s\n", + t, ctime4(&t), getpid(), cuser.userid, fpath); + vedit(fpath, NA, NULL); + } + r = FULLUPDATE; + } + + return r; } |