diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-08-29 20:44:59 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-08-29 20:44:59 +0800 |
commit | b6cca7a4526e80ad9061c8c76d197a40a2fbfa79 (patch) | |
tree | a9aa9783a79c975a01e82b18f9ba481bcfd87e17 /mbbsd/friend.c | |
parent | 2db124735fce231de88442ea4861d9196da04ffb (diff) | |
download | pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.tar pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.tar.gz pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.tar.bz2 pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.tar.lz pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.tar.xz pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.tar.zst pttbbs-b6cca7a4526e80ad9061c8c76d197a40a2fbfa79.zip |
* because PERM_HIDE does not update lastlogin time, we must skip them in namelist validation (thanks to Lwms@ptt.cc#PttBug)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4785 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/friend.c')
-rw-r--r-- | mbbsd/friend.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c index 1d63335e..ea565325 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -272,10 +272,15 @@ friend_validate(int type, int expire) if (searchuser(buf, NULL)) { if (expire > 0) { + userec_t *pu = &u; // drop user if (now-lastlogin) longer than expire*month getuser(buf, &u); - if (now - u.lastlogin > expire) + // XXX lastlogin was NOT counting people with PERM_HIDE... + // although we will have 'lastseen' in future, + // never count people with PERM_HIDE. + if (!(PERM_HIDE(pu)) && + now - u.lastlogin > expire) continue; } fputs(genbuf, nfp); |