diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/proto.h | 1 | ||||
-rw-r--r-- | include/pttstruct.h | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/proto.h b/include/proto.h index 4263dd01..bd547eea 100644 --- a/include/proto.h +++ b/include/proto.h @@ -718,6 +718,7 @@ int pwcuLoginSave (); int pwcuExitSave (); // initialization +void pwcuInitZero (); void pwcuInitGuestPerm (); void pwcuInitGuestInfo (); int pwcuInitAdminPerm (); 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 |