summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/register.c5
-rw-r--r--sample/pttbbs.conf3
2 files changed, 8 insertions, 0 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c
index 9ccc68a3..f75088c4 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -61,6 +61,11 @@ bad_user_id(const char *userid)
if (strcasecmp(userid, str_new) == 0)
return 1;
+#ifdef NO_GUEST_ACCOUNT_REG
+ if (strcasecmp(userid, STR_GUEST) == 0)
+ return 1;
+#endif
+
/* in2: 原本是用strcasestr,
不過有些人中間剛剛好出現這個字應該還算合理吧? */
if( strncasecmp(userid, "fuck", 4) == 0 ||
diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf
index 37101764..bfd002ff 100644
--- a/sample/pttbbs.conf
+++ b/sample/pttbbs.conf
@@ -220,6 +220,9 @@
/* 在 cacheserver 上面擋掉狂上下站的使用者 */
//#define NOFLOODING
+/* 若定義, 則不允許註冊 guest */
+//#define NO_GUEST_ACCOUNT_REG
+
/* 前進站畫面 */
#define INSCREEN \
"前進站畫面 (請至 pttbbs.conf 修改您的前進站畫面)"