summaryrefslogtreecommitdiffstats
path: root/include/pttstruct.h
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-08-29 20:59:17 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-08-29 20:59:17 +0800
commite40b5f174956a652514959e367df348c0ad66d9f (patch)
tree857b4187351c304433b8f79c1f7b4a506b0132f9 /include/pttstruct.h
parentf70549636d72d203ed0f50fb66688319c3fcb878 (diff)
downloadpttbbs-e40b5f174956a652514959e367df348c0ad66d9f.tar
pttbbs-e40b5f174956a652514959e367df348c0ad66d9f.tar.gz
pttbbs-e40b5f174956a652514959e367df348c0ad66d9f.tar.bz2
pttbbs-e40b5f174956a652514959e367df348c0ad66d9f.tar.lz
pttbbs-e40b5f174956a652514959e367df348c0ad66d9f.tar.xz
pttbbs-e40b5f174956a652514959e367df348c0ad66d9f.tar.zst
pttbbs-e40b5f174956a652514959e367df348c0ad66d9f.zip
* enable lastseen and CONST_CUSER, also use cuser_ref as "&cuser".
git-svn-id: http://opensvn.csie.org/pttbbs/branches/pttbbs.pwcu@4786 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include/pttstruct.h')
-rw-r--r--include/pttstruct.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h
index c0ea9f64..cd0c98df 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -66,7 +66,7 @@ typedef struct userec_t {
uint32_t numlogins; /* 上站次數 */
uint32_t numposts; /* 文章篇數 */
time4_t firstlogin; /* 註冊時間 */
- time4_t lastlogin; /* 最近上站時間 */
+ time4_t lastlogin; /* 最近上站時間(包含隱身) */
char lasthost[IPV4LEN+1];/* 上次上站來源 */
int32_t money; /* Ptt幣 */
@@ -97,7 +97,8 @@ typedef struct userec_t {
uint32_t numlogindays; /* 登入天次 */
char chkpad1[48];
- time4_t chkpad2[3]; /* in case 有人忘了把 time4_t 調好... */
+ time4_t lastseen; /* 最近上站時間(隱身不計) */
+ time4_t chkpad2[2]; /* in case 有人忘了把 time4_t 調好... */
// 以上應為 sizeof(chicken_t) 同等大小
time4_t lastsong; /* 上次點歌時間 */
@@ -138,6 +139,14 @@ typedef struct userec_t {
char pad_tail[28];
} PACKSTRUCT userec_t;
+#ifdef CONST_CUSER
+# define cuser ((const userec_t ) pwcuser)
+# define cuser_ref ((const userec_t*)&pwcuser)
+#else
+# define cuser pwcuser
+# define cuser_ref (&cuser)
+#endif
+
/* flags in userec_t.withme */
#define WITHME_ALLFLAG 0x55555555
#define WITHME_TALK 0x00000001