From 69165fe96c9c6ed04697bc61d75196bf7454636d Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 23 Oct 2004 12:16:16 +0000 Subject: WARNING revise userec_t structure (enlarge numpost, numlogins, and add column "version") provide util/passwdconverter to help the convertion git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2273 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/proto.h | 1 + include/pttstruct.h | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/proto.h b/include/proto.h index 68b39f86..8b1f1927 100644 --- a/include/proto.h +++ b/include/proto.h @@ -50,6 +50,7 @@ int inc_badsale(char *, int num); /* bbs */ int invalid_brdname(char *brd); +void chomp(char *src); int del_range(int ent, fileheader_t *fhdr, char *direct); int cmpfowner(fileheader_t *fhdr); int b_note_edit_bname(int bid); diff --git a/include/pttstruct.h b/include/pttstruct.h index c6bf8107..ddf78fe3 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -52,14 +52,18 @@ typedef struct chicken_t { #define REGLEN 38 /* Length of registration data */ typedef struct userec_t { + unsigned int version; /* version number of this sturcture, we + * use revision number of project to denote.*/ + char userid[IDLEN + 1]; char realname[20]; char username[24]; char passwd[PASSLEN]; - unsigned char uflag; + unsigned int uflag; + unsigned int uflag2; unsigned int userlevel; - unsigned short numlogins; - unsigned short numposts; + unsigned int numlogins; + unsigned int numposts; time_t firstlogin; time_t lastlogin; char lasthost[16]; @@ -91,7 +95,6 @@ typedef struct userec_t { int mobile; char mind[4]; char ident[11]; - unsigned int uflag2; unsigned char signature; unsigned char goodpost; /* 評價為好文章數 */ @@ -101,7 +104,7 @@ typedef struct userec_t { char myangel[IDLEN+1]; /* 我的小天使 */ unsigned short chess_elo_rating; /* 象棋等級分 */ unsigned int withme; - char pad[48]; + char pad[34]; } userec_t; /* these are flags in userec_t.uflag */ #define PAGER_FLAG 0x4 /* true if pager was OFF last session */ -- cgit v1.2.3