summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c5
-rw-r--r--mbbsd/register.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 887ca77e..0958988d 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1139,9 +1139,6 @@ user_login(void)
/* get local time */
localtime4_r(&now, &ptime);
- /* 初始化: random number 增加user跟時間的差異 */
- mysrand();
-
log_usies("ENTER", fromhost);
#ifndef VALGRIND
setproctitle("%s: %s", margs, cuser.userid);
@@ -1385,6 +1382,8 @@ start_client(void)
Signal(SIGALRM, abort_bbs);
alarm(600);
+ mysrand(); /* 初始化: random number 增加user跟時間的差異 */
+
login_query(); /* Ptt 加上login time out */
m_init(); /* init the user mail path */
user_login();
diff --git a/mbbsd/register.c b/mbbsd/register.c
index b3ba087f..6117b47e 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -374,7 +374,7 @@ delregcodefile(void)
////////////////////////////////////////////////////////////////////////////
// Figlet Captcha System
////////////////////////////////////////////////////////////////////////////
-#ifdef USE_FIGLET_CAPCTHA
+#ifdef USE_FIGLET_CAPTCHA
int
gen_captcha(char *buf, int szbuf, char *fpath)
@@ -509,7 +509,7 @@ int verify_captcha()
clear();
return 1;
}
-#else // NO CAPTCHA
+#else // !USE_FIGLET_CAPTCHA
int
verify_captcha()
@@ -517,7 +517,7 @@ verify_captcha()
return 1;
}
-#endif
+#endif // !USE_FIGLET_CAPTCHA
////////////////////////////////////////////////////////////////////////////
// Justify Utilities