summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-06 09:19:09 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-06 09:19:09 +0800
commit766cd00993800ae7dfcf3a869c83c0c118e6c018 (patch)
tree2337448a5841e97585904309df9294ad68e439cd
parent9be6df875abfd16d1981395398619008fedbde85 (diff)
downloadpttbbs.sr_digest@4904.tar
pttbbs.sr_digest@4904.tar.gz
pttbbs.sr_digest@4904.tar.bz2
pttbbs.sr_digest@4904.tar.lz
pttbbs.sr_digest@4904.tar.xz
pttbbs.sr_digest@4904.tar.zst
pttbbs.sr_digest@4904.zip
* anonymous id should not use '-' as prefix because it has special meaning (deleted).pttbbs.sr_digest@4904
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4903 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 676fc7de..366c5673 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1594,12 +1594,20 @@ write_header(FILE * fp, const char *mytitle)
real_name, sizeof(real_name), DOECHO, mynick);
} else
#endif // PLAY_ANGEL && BN_ANGELPRAY
- if (defanony)
- getdata(3, 0, "請輸入你想用的ID,也可直接按[Enter],"
- "或是按[r]用真名:", real_name, sizeof(real_name), DOECHO);
- else
- getdata(3, 0, "請輸入你想用的ID,也可直接按[Enter]使用原ID:",
+ do {
+ getdata(3, 0, defanony ?
+ "請輸入你想用的ID,也可直接按[Enter],或是按[r]用真名:" :
+ "請輸入你想用的ID,也可直接按[Enter]使用原ID:",
real_name, sizeof(real_name), DOECHO);
+ // names with '-' prefix are considered as 'deleted'.
+ if (real_name[0] == '-')
+ {
+ mvouts(4, 0, "抱歉,請勿使用以 - 開頭的名稱。");
+ continue;
+ }
+ break;
+ } while(1);
+
if (!real_name[0] && defanony) {
strlcpy(real_name, "Anonymous", sizeof(real_name));
strlcpy(postlog.author, real_name, sizeof(postlog.author));