summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-11-06 23:55:18 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-11-06 23:55:18 +0800
commit3022eadda34fc29f2000a71c725a0a81d8144ac7 (patch)
tree0b78ccc49864622f58679523455ed1185429c770
parent43ee6ddbeeefb1d55f0815fbf3a17e9f4b446d3f (diff)
downloadpttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.tar
pttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.tar.gz
pttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.tar.bz2
pttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.tar.lz
pttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.tar.xz
pttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.tar.zst
pttbbs-3022eadda34fc29f2000a71c725a0a81d8144ac7.zip
really remove sex from code base
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5212 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/mbbsd.c4
-rw-r--r--pttbbs/mbbsd/passwd.c12
-rw-r--r--pttbbs/mbbsd/register.c14
-rw-r--r--pttbbs/mbbsd/talk.c10
-rw-r--r--pttbbs/mbbsd/user.c21
5 files changed, 0 insertions, 61 deletions
diff --git a/pttbbs/mbbsd/mbbsd.c b/pttbbs/mbbsd/mbbsd.c
index 0693a76a..33abb6c3 100644
--- a/pttbbs/mbbsd/mbbsd.c
+++ b/pttbbs/mbbsd/mbbsd.c
@@ -1010,10 +1010,6 @@ setup_utmp(int mode)
uinfo.userlevel = cuser.userlevel;
uinfo.lastact = time(NULL);
-#ifdef USE_USER_SEX
- uinfo.sex = cuser.sex % 8;
-#endif
-
// only enable this after you've really changed talk.c to NOT use from_alias.
uinfo.from_ip = inet_addr(fromhost);
diff --git a/pttbbs/mbbsd/passwd.c b/pttbbs/mbbsd/passwd.c
index a3be31bd..04a38041 100644
--- a/pttbbs/mbbsd/passwd.c
+++ b/pttbbs/mbbsd/passwd.c
@@ -255,9 +255,6 @@ int pwcuRegisterSetInfo (const char *rname,
const char *phone,
const char *email,
int mobile,
-#ifdef USE_USER_SEX
- uint8_t sex,
-#endif
uint8_t year,
uint8_t month,
uint8_t day,
@@ -270,9 +267,6 @@ int pwcuRegisterSetInfo (const char *rname,
strlcpy(u.phone, phone, sizeof(u.phone));
strlcpy(u.email, email, sizeof(u.email));
u.mobile = mobile;
-#ifdef USE_USER_SEX
- u.sex = sex;
-#endif
u.year = year;
u.month = month;
u.day = day;
@@ -286,9 +280,6 @@ int pwcuRegisterSetInfo (const char *rname,
strlcpy(cuser.phone, phone, sizeof(cuser.phone));
strlcpy(cuser.email, email, sizeof(cuser.email));
cuser.mobile = mobile;
-#ifdef USE_USER_SEX
- cuser.sex = sex;
-#endif
cuser.year = year;
cuser.month = month;
cuser.day = day;
@@ -636,7 +627,4 @@ void pwcuInitGuestInfo ()
sizeof(currutmp->nickname));
strlcpy(cuser.realname, "guest", sizeof(cuser.realname));
memset (cuser.mind, 0, sizeof(cuser.mind));
-#ifdef USE_USER_SEX
- cuser.sex = i % 8;
-#endif
}
diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c
index c952dd35..dc3bb100 100644
--- a/pttbbs/mbbsd/register.c
+++ b/pttbbs/mbbsd/register.c
@@ -1116,9 +1116,6 @@ u_register(void)
char ans[3], *errcode;
int i = 0;
int isForeign = (HasUserFlag(UF_FOREIGN)) ? 1 : 0;
-#ifdef USE_USER_SEX
- char sex_is[2];
-#endif
if (cuser.userlevel & PERM_LOGINOK) {
outs("您的身份確認已經完成,不需填寫申請表");
@@ -1162,11 +1159,6 @@ u_register(void)
snprintf(birthday, sizeof(birthday), "%04i/%02i/%02i",
1900 + cuser.year, cuser.month, cuser.day);
-#ifdef USE_USER_SEX
- sex_is[0] = (cuser.sex % 8) + '1';
- sex_is[1] = 0;
-#endif
-
if (cuser.userlevel & PERM_NOREGCODE) {
vmsg("您不被允許\使用認證碼認證。請填寫註冊申請單");
goto REGFORM;
@@ -1393,9 +1385,6 @@ u_register(void)
}
break;
}
-#ifdef USE_USER_SEX
- getfield(10, "1.♂男 2.♀女 ", REGNOTES_ROOT "sex", "性別", sex_is, 2);
-#endif
getdata(20, 0, "以上資料是否正確(Y/N)?(Q)取消註冊 [N] ",
ans, 3, LCECHO);
if (ans[0] == 'q')
@@ -1410,9 +1399,6 @@ u_register(void)
// copy values to cuser
pwcuRegisterSetInfo(rname, addr, career, phone, email,
atoi(mobile),
-#ifdef USE_USER_SEX
- (sex_is[0] - '1') % 8,
-#endif
year, mon, day, isForeign);
// if reach here, email is apparently 'x'.
diff --git a/pttbbs/mbbsd/talk.c b/pttbbs/mbbsd/talk.c
index f8a97b1e..f74086a2 100644
--- a/pttbbs/mbbsd/talk.c
+++ b/pttbbs/mbbsd/talk.c
@@ -434,11 +434,6 @@ my_query(const char *uident)
int is_self = 0;
userinfo_t *uentp;
static time_t last_query;
-#ifdef USE_USER_SEX
- const char *sex[8] = {
- MSG_BIG_BOY, MSG_BIG_GIRL, MSG_LITTLE_BOY, MSG_LITTLE_GIRL,
- MSG_MAN, MSG_WOMAN, MSG_PLANT, MSG_MIME};
-#endif
STATINC(STAT_QUERY);
if ((tuid = getuser(uident, &muser))) {
@@ -513,11 +508,6 @@ my_query(const char *uident)
muser.five_win, muser.five_lose, muser.five_tie,
muser.chc_win, muser.chc_lose, muser.chc_tie);
-#ifdef USE_USER_SEX
- if ((uentp && ((fri_stat & HFM) || is_self) && !uentp->invisible))
- prints("《 性 別 》%-28.28s\n", sex[muser.sex % 8]);
-#endif
-
showplans_userec(&muser);
if(HasUserPerm(PERM_SYSOP|PERM_POLICE) )
{
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c
index 9e9d366c..1f0c3244 100644
--- a/pttbbs/mbbsd/user.c
+++ b/pttbbs/mbbsd/user.c
@@ -2,13 +2,6 @@
#define PWCU_IMPL
#include "bbs.h"
-#ifdef USE_USER_SEX
-static char * const sex[8] = {
- MSG_BIG_BOY, MSG_BIG_GIRL, MSG_LITTLE_BOY, MSG_LITTLE_GIRL,
- MSG_MAN, MSG_WOMAN, MSG_PLANT, MSG_MIME
-};
-#endif
-
#ifdef CHESSCOUNTRY
static const char * const chess_photo_name[3] = {
"photo_fivechess", "photo_cchess", "photo_go",
@@ -177,9 +170,6 @@ user_display(const userec_t * u, int adminmode)
prints("\t電子信箱: %s\n", u->email);
prints("\t銀行帳戶: %d " MONEYNAME "幣\n", u->money);
-#ifdef USE_USER_SEX
- prints("\t性 別: %s\n", sex[u->sex%8]);
-#endif
prints("\t生 日: %04i/%02i/%02i (%s滿18歲)\n",
u->year + 1900, u->month, u->day,
resolve_over18_user(u) ? "已" : "未");
@@ -735,17 +725,6 @@ uinfo_query(const char *orig_uid, int adminmode, int unum)
getdata_buf(y++, 0, "手機號碼:", buf, 11, NUMECHO);
x.mobile = atoi(buf);
-#ifdef USE_USER_SEX
- snprintf(genbuf, sizeof(genbuf), "%d", (x.sex + 1) % 8);
- getdata_str(y++, 0, "性別 (1)葛格 (2)姐接 (3)底迪 (4)美眉 (5)薯叔 "
- "(6)阿姨 (7)植物 (8)礦物:",
- buf, 3, NUMECHO, genbuf);
- if (buf[0] >= '1' && buf[0] <= '8')
- x.sex = (buf[0] - '1') % 8;
- else
- x.sex = x.sex % 8;
-#endif
-
while (1) {
snprintf(genbuf, sizeof(genbuf), "%04i/%02i/%02i",
x.year + 1900, x.month, x.day);