diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-02-23 15:17:18 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-02-23 15:17:18 +0800 |
commit | 19a026c01a7d7b1dcebb1f626a919e3a2ba309b4 (patch) | |
tree | 2001cce9a957863260f2a077a16818bd15d7d602 | |
parent | 62bc73af704141f8c18c9bbc6ff7ee2d69459bd6 (diff) | |
download | pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.tar pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.tar.gz pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.tar.bz2 pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.tar.lz pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.tar.xz pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.tar.zst pttbbs-19a026c01a7d7b1dcebb1f626a919e3a2ba309b4.zip |
Remove birthday to avoid unnecessary personal private info.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5940 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/include/proto.h | 1 | ||||
-rw-r--r-- | pttbbs/include/pttstruct.h | 14 | ||||
-rw-r--r-- | pttbbs/mbbsd/admin.c | 8 | ||||
-rw-r--r-- | pttbbs/mbbsd/passwd.c | 3 | ||||
-rw-r--r-- | pttbbs/mbbsd/register.c | 57 | ||||
-rw-r--r-- | pttbbs/mbbsd/user.c | 3 |
6 files changed, 10 insertions, 76 deletions
diff --git a/pttbbs/include/proto.h b/pttbbs/include/proto.h index d5556798..2df47a81 100644 --- a/pttbbs/include/proto.h +++ b/pttbbs/include/proto.h @@ -804,7 +804,6 @@ int pwcuRegSetTemporaryJustify(const char *justify, const char *email); int pwcuRegisterSetInfo (const char *rname, const char *addr, const char *career, - const char *phone, const char *email, uint8_t is_foreign); diff --git a/pttbbs/include/pttstruct.h b/pttbbs/include/pttstruct.h index 90f34a73..5524f1f1 100644 --- a/pttbbs/include/pttstruct.h +++ b/pttbbs/include/pttstruct.h @@ -88,7 +88,7 @@ typedef struct userec_t { // r3968 移出 sizeof(chicken_t)=128 bytes char _unused5[4]; char career[40]; /* 學歷職業 */ - char phone[20]; /* 電話 */ + char _unused_phone[20]; /* 電話 */ uint32_t _unused6; /* 從前放轉換前的 numlogins, 使用前請先清0 */ char chkpad1[44]; uint32_t role; /* Role-specific permissions */ @@ -409,7 +409,6 @@ typedef struct userinfo_t { unsigned int withme; unsigned int brc_id; - #ifdef NOKILLWATERBALL time4_t wbtime; #endif @@ -452,13 +451,6 @@ typedef struct { #define ANSILINELEN (511) /* Maximum Screen width in chars */ -/* anti_crosspost */ -typedef struct crosspost_t { - int checksum[4]; /* 0 -> 'X' cross post 1-3 -> 檢查文章行 */ - short times; /* 第幾次 */ - short last_bid; /* crossport to which board */ -} crosspost_t; - #define SORT_BY_ID 0 #define SORT_BY_CLASS 1 #define SORT_BY_STAT 1 @@ -490,7 +482,7 @@ typedef struct keeploc_t { typedef struct { int version; // SHM_VERSION for verification int size; // sizeof(SHM_t) for verification - + /* uhash */ /* uhash is a userid->uid hash table -- jochang */ char userid[MAX_USERS][IDLEN + 1]; @@ -499,6 +491,7 @@ typedef struct { char gap_2[sizeof(int)]; int money[MAX_USERS]; char gap_3[sizeof(int)]; + // TODO(piaip) Always have this var - no more #ifdefs in structure. #ifdef USE_COOLDOWN time4_t cooldowntime[MAX_USERS]; #endif @@ -529,6 +522,7 @@ typedef struct { char gap_10[sizeof(int)]; int bsorted[2][MAX_BOARD]; /* 0: by name 1: by class */ /* 裡頭存的是 bid-1 */ char gap_11[sizeof(int)]; + // TODO(piaip) Always have this var - no more #ifdefs in structure. #if HOTBOARDCACHE unsigned char nHOTs; int HBcache[HOTBOARDCACHE]; diff --git a/pttbbs/mbbsd/admin.c b/pttbbs/mbbsd/admin.c index 67f83e4a..df5045fe 100644 --- a/pttbbs/mbbsd/admin.c +++ b/pttbbs/mbbsd/admin.c @@ -104,7 +104,6 @@ upgrade_passwd(userec_t *puser) if (puser->version == 2275) // chicken change { memset(puser->career, 0, sizeof(puser->career)); - memset(puser->phone, 0, sizeof(puser->phone)); memset(puser->chkpad0, 0, sizeof(puser->chkpad0)); memset(puser->chkpad1, 0, sizeof(puser->chkpad1)); memset(puser->chkpad2, 0, sizeof(puser->chkpad2)); @@ -136,12 +135,12 @@ search_key_user(const char *passwdfile, int mode) } else { // improved search vs_hdr("關鍵字搜尋"); - outs("搜尋欄位: [0]全部 1.ID 2.姓名 3.暱稱 4.地址 5.Mail 6.IP 7.職業 8.電話 9.認證\n"); + outs("搜尋欄位: [0]全部 1.ID 2.姓名 3.暱稱 4.地址 5.Mail 6.IP 7.職業 8.認證\n"); getdata(2, 0, "要搜尋哪種資料?", key, 2, NUMECHO); if (isascii(key[0]) && isdigit(key[0])) keytype = key[0] - '0'; - if (keytype < 0 || keytype > 9) + if (keytype < 0 || keytype > 8) keytype = 0; getdata(3, 0, "請輸入關鍵字: ", key, sizeof(key), DOECHO); } @@ -200,9 +199,6 @@ search_key_user(const char *passwdfile, int mode) DBCS_strcasestr(user.career, key)) keymatch = user.career; else if ((!keytype || keytype == 8) && - DBCS_strcasestr(user.phone, key)) - keymatch = user.phone; - else if ((!keytype || keytype == 9) && DBCS_strcasestr(user.justify, key)) keymatch = user.justify; } diff --git a/pttbbs/mbbsd/passwd.c b/pttbbs/mbbsd/passwd.c index 29ed4725..5d6d4cb4 100644 --- a/pttbbs/mbbsd/passwd.c +++ b/pttbbs/mbbsd/passwd.c @@ -262,7 +262,6 @@ pwcuRegSetTemporaryJustify(const char *justify, const char *email) int pwcuRegisterSetInfo (const char *rname, const char *addr, const char *career, - const char *phone, const char *email, uint8_t is_foreign) { @@ -270,7 +269,6 @@ int pwcuRegisterSetInfo (const char *rname, strlcpy(u.realname, rname, sizeof(u.realname)); strlcpy(u.address, addr, sizeof(u.address)); strlcpy(u.career, career, sizeof(u.career)); - strlcpy(u.phone, phone, sizeof(u.phone)); strlcpy(u.email, email, sizeof(u.email)); _SETBY_BIT(u.uflag, UF_FOREIGN, is_foreign); @@ -278,7 +276,6 @@ int pwcuRegisterSetInfo (const char *rname, strlcpy(cuser.realname, rname, sizeof(cuser.realname)); strlcpy(cuser.address, addr, sizeof(cuser.address)); strlcpy(cuser.career, career, sizeof(cuser.career)); - strlcpy(cuser.phone, phone, sizeof(cuser.phone)); strlcpy(cuser.email, email, sizeof(cuser.email)); _SETBY_BIT(cuser.uflag, UF_FOREIGN, is_foreign); diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c index 40926e53..888c3a5e 100644 --- a/pttbbs/mbbsd/register.c +++ b/pttbbs/mbbsd/register.c @@ -193,28 +193,6 @@ isvalidaddr(char *addr) return NULL; } -static char * -isvalidphone(char *phone) -{ - int i; - -#ifdef DBG_DISABLE_CHECK - return NULL; -#endif // DBG_DISABLE_CHECK - - for( i = 0 ; phone[i] != 0 ; ++i ) - if( !isdigit((int)phone[i]) ) - return "請不要加分隔符號"; - if (!removespace(phone) || - strlen(phone) < 9 || - strstr(phone, "00000000") != NULL || - strstr(phone, "22222222") != NULL ) { - return "這個電話號碼並不正確(請含區碼)" ; - } - return NULL; -} - - //////////////////////////////////////////////////////////////////////////// // Account Expiring //////////////////////////////////////////////////////////////////////////// @@ -996,7 +974,6 @@ create_regform_request() fprintf(fn, "name: %s\n", cuser.realname); fprintf(fn, "career: %s\n", cuser.career); fprintf(fn, "addr: %s\n", cuser.address); - fprintf(fn, "phone: %s\n", cuser.phone); fprintf(fn, "email: %s\n", "x"); // email is apparently 'x' here. fprintf(fn, "----\n"); fclose(fn); @@ -1115,7 +1092,7 @@ int u_register(void) { char rname[20], addr[50]; - char phone[20], career[40], email[50]; + char career[40], email[50]; char inregcode[14], regcode[50]; char ans[3], *errcode; int i = 0; @@ -1150,7 +1127,6 @@ u_register(void) strlcpy(addr, cuser.address, sizeof(addr)); strlcpy(email, cuser.email, sizeof(email)); strlcpy(career,cuser.career, sizeof(career)); - strlcpy(phone, cuser.phone, sizeof(phone)); if (cuser.userlevel & PERM_NOREGCODE) { vmsg("您不被允許\使用認證碼認證。請填寫註冊申請單"); @@ -1347,19 +1323,6 @@ u_register(void) vmsg(errcode); } - while (1) { - getfield(7, "不加-(), 包括長途區號", - REGNOTES_ROOT "phone", "連絡電話", phone, 11); - if( (errcode = isvalidphone(phone)) == NULL ) - break; -#ifdef FOREIGN_REG - else if(isForeign && !strstr(errcode, "分隔符號")) - break; -#endif - else - vmsg(errcode); - } - getdata(20, 0, "以上資料是否正確(Y/N)?(Q)取消註冊 [N] ", ans, 3, LCECHO); if (ans[0] == 'q') @@ -1372,7 +1335,7 @@ u_register(void) #endif // copy values to cuser - pwcuRegisterSetInfo(rname, addr, career, phone, email, isForeign); + pwcuRegisterSetInfo(rname, addr, career, email, isForeign); // if reach here, email is apparently 'x'. toregister(email); @@ -1400,7 +1363,6 @@ print_regform_entry(const RegformEntry *pre, FILE *fp, int close) fprintf(fp, "name: %s\n", pre->u.realname); fprintf(fp, "career: %s\n", pre->u.career); fprintf(fp, "addr: %s\n", pre->u.address); - fprintf(fp, "phone: %s\n", pre->u.phone); fprintf(fp, "lasthost: %s\n", pre->u.lasthost); if (close) fprintf(fp, "----\n"); @@ -1422,8 +1384,6 @@ concat_regform_entry_localized(const RegformEntry *pre, char *result, int maxlen len = strlen(result); snprintf(result + len, maxlen - len, "目前住址: %s\n", pre->u.address); len = strlen(result); - snprintf(result + len, maxlen - len, "電話號碼: %s\n", pre->u.phone); - len = strlen(result); snprintf(result + len, maxlen - len, "上站位置: %s\n", pre->u.lasthost); len = strlen(result); snprintf(result + len, maxlen - len, "----\n"); @@ -2013,7 +1973,6 @@ ui_display_regform_single( ""); prints("1.%-12s: %s\n", "服務單位", pre->u.career); prints("2.%-12s: %s\n", "目前住址", pre->u.address); - prints("3.%-12s: %s\n", "連絡電話", pre->u.phone); move(b_lines, 0); outs("是否接受此資料(Y/N/Q/Del/Skip)?[S] "); @@ -2224,16 +2183,8 @@ regform2_validate_page(int dryrun) move(i*2+1, 0); prints(" %s ", (forms[i].u.userlevel & PERM_NOREGCODE) ? ANSI_COLOR(1;31) "T" ANSI_RESET : " "); - // try to print lasthost if possible - int delta = 70 - 2 - strlen(forms[i].u.address) - - strlen(forms[i].u.phone) - strlen(forms[i].u.lasthost); - if (delta < 0) - prints("%-50s%20s\n", forms[i].u.address, forms[i].u.phone); - else - prints("%s" ANSI_COLOR(0;33) " %*s%s " ANSI_RESET "%s\n", - forms[i].u.address, delta, "", - forms[i].u.lasthost, forms[i].u.phone); - + prints("%-50s" ANSI_COLOR(0;33) "%s" ANSI_RESET "\n", + forms[i].u.address, forms[i].u.lasthost); cforms++, tid ++; } diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c index 080d62f0..1fa6e04b 100644 --- a/pttbbs/mbbsd/user.c +++ b/pttbbs/mbbsd/user.c @@ -190,7 +190,6 @@ user_display(const userec_t * u, int adminmode) outs("\n"); // end of realname prints("\t職業學歷: %s\n", u->career); prints("\t居住地址: %s\n", u->address); - prints("\t電 話: %s\n", u->phone); prints("\t電子信箱: %s\n", u->email); prints("\t%6s幣: %d " MONEYNAME "\n", BBSMNAME, u->money); @@ -756,8 +755,6 @@ uinfo_query(const char *orig_uid, int adminmode, int unum) x.address, sizeof(x.address), DOECHO); getdata_buf(y++, 0, "學歷職業:", x.career, sizeof(x.career), DOECHO); - getdata_buf(y++, 0, "電話號碼:", x.phone, - sizeof(x.phone), DOECHO); } do { |