diff options
-rw-r--r-- | mbbsd/admin.c | 12 | ||||
-rw-r--r-- | mbbsd/user.c | 5 | ||||
-rw-r--r-- | mbbsd/voteboard.c | 5 |
3 files changed, 12 insertions, 10 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index b1553f3c..03199d5f 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -39,7 +39,7 @@ search_key_user(char *passwdfile, int mode) assert(fp1); clear(); - getdata(0, 0, mode ? "請輸入使用者關鍵字[電話|地址|姓名|上站地點|" + getdata(0, 0, mode ? "請輸入使用者關鍵字[電話|地址|姓名|身份證|上站地點|" "email|小雞id] :" : "請輸入id :", key, sizeof(key), DOECHO); if(!key[0]) return 0; @@ -52,8 +52,7 @@ search_key_user(char *passwdfile, int mode) keymatch = NULL; if (!strcasecmp(user.userid, key)) keymatch = user.userid; - else if(mode) - { + else if(mode) { if(strstr(user.realname, key)) keymatch = user.realname; else if(strstr(user.username, key)) @@ -68,9 +67,10 @@ search_key_user(char *passwdfile, int mode) keymatch = user.justify; else if(strstr(user.mychicken.name, key)) keymatch = user.mychicken.name; - } - if(keymatch) - { + else if(strstr(user.ident, key)) + keymatch = user.ident; + } + if(keymatch) { move(1, 0); prints("第 [%d] 筆資料\n", coun); refresh(); diff --git a/mbbsd/user.c b/mbbsd/user.c index 3554103f..bd88b1f4 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -1249,9 +1249,10 @@ u_register(void) } else if (strcmp(inregcode, "x") != 0 && strcmp(inregcode, "X") != 0) { outs("認證碼錯誤\n"); pressanykey(); + } else { + toregister(email, genbuf, phone, career, ident, rname, addr, mobile); + return FULLUPDATE; } - toregister(email, genbuf, phone, career, ident, rname, addr, mobile); - return FULLUPDATE; } getdata(b_lines - 1, 0, "您確定要填寫註冊單嗎(Y/N)?[N] ", diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c index 897f68f9..2556942e 100644 --- a/mbbsd/voteboard.c +++ b/mbbsd/voteboard.c @@ -80,8 +80,9 @@ do_voteboardreply(fileheader_t * fhdr) return; } } while (opnion[0] != 'y' && opnion[0] != 'n'); - if (!getdata_buf(20, 0, "請問您與這個議題的關係或連署理由為何:", - reason, 35, DOECHO)) { + sprintf(genbuf, "請問您與這個議題的關係或%s理由為何:", + opnion[0] == 'y' ? "支持" : "反對"); + if (!getdata_buf(20, 0, genbuf, reason, 35, DOECHO)) { return; } if ((fd = open(oldfpath, O_RDONLY)) == -1) |