summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 8bceabc9..31cf0bc7 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -257,8 +257,17 @@ abort_bbs_debug(int sig)
sigaddset(&sigset, SIGXCPU);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
-#define CRASH_MSG ANSI_COLOR(0) "\r\n程式異常, 立刻斷線. 請洽 PttBug 板詳述你發生的問題.\r\n"
-#define XCPU_MSG ANSI_COLOR(0) "\r\n程式耗用過多計算資源, 立刻斷線. 可能是 (a)執行太多耗用資源的動作 或 (b)程式掉入無窮迴圈. 請洽 PttBug 板詳述你發生的問題.\r\n"
+ // TODO change the PttBug to some other names for non-PTT sites?
+
+#define CRASH_MSG ANSI_COLOR(0) \
+ "\r\n程式異常, 立刻斷線. \r\n" \
+ "請洽 PttBug 板詳述問題發生經過。\r\n"
+
+#define XCPU_MSG ANSI_COLOR(0) \
+ "\r\n程式耗用過多計算資源, 立刻斷線。\r\n" \
+ "可能是 (a)執行太多耗用資源的動作 或 (b)程式掉入無窮迴圈. "\
+ "請洽 PttBug 板詳述問題發生經過。\r\n"
+
if(sig==SIGXCPU)
write(1, XCPU_MSG, sizeof(XCPU_MSG));
else
@@ -684,8 +693,13 @@ login_query(void)
move(19, 0);
prints("current pid: %d ", getpid());
#endif
- getdata(20, 0, "請輸入代號,或以[guest]參觀,以[new]註冊:",
- uid, sizeof(uid), DOECHO);
+ while (getdata(20, 0, "請輸入代號,或以[guest]參觀,以[new]註冊:",
+ uid, sizeof(uid), DOECHO) < 1)
+ {
+ // got nothing
+ outs("請重新輸入。\n");
+ }
+
#ifdef CONVERT
/* switch to gb mode if uid end with '.' */
len = strlen(uid);