diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-10-25 08:55:02 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-10-25 08:55:02 +0800 |
commit | 0947c1301d4cdfaa592960157cca51d71df95c5f (patch) | |
tree | cdf5ec328e703925734fcc3b004d883e87fbcdab | |
parent | b43e85cdcb9de8771ae567f1bcb4e18d3943ee53 (diff) | |
download | pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.tar pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.tar.gz pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.tar.bz2 pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.tar.lz pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.tar.xz pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.tar.zst pttbbs-0947c1301d4cdfaa592960157cca51d71df95c5f.zip |
alert about setting a long ban expire date.
fix the mvprints which has never been used...
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5165 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/include/config.h | 8 | ||||
-rw-r--r-- | pttbbs/mbbsd/acl.c | 12 | ||||
-rw-r--r-- | pttbbs/mbbsd/register.c | 5 | ||||
-rw-r--r-- | pttbbs/mbbsd/vtuikit.c | 2 |
4 files changed, 21 insertions, 6 deletions
diff --git a/pttbbs/include/config.h b/pttbbs/include/config.h index c191380c..00b3e346 100644 --- a/pttbbs/include/config.h +++ b/pttbbs/include/config.h @@ -164,6 +164,14 @@ #define MAX_LIFE (120 * 24 * 60 * 60) #endif +#ifndef KEEP_DAYS_REGGED /* 已註冊使用者保留多久 */ +#define KEEP_DAYS_REGGED (120) +#endif + +#ifndef KEEP_DAYS_UNREGGED /* 未註冊使用者保留多久 */ +#define KEEP_DAYS_UNREGGED (15) +#endif + #ifndef MAX_FROM #define MAX_FROM (300) /* 最多故鄉數 */ #endif diff --git a/pttbbs/mbbsd/acl.c b/pttbbs/mbbsd/acl.c index 44aa60b6..c6499c00 100644 --- a/pttbbs/mbbsd/acl.c +++ b/pttbbs/mbbsd/acl.c @@ -225,7 +225,7 @@ ANSI_COLOR(1) " = 想查看某使用者為何被水桶可用(S)或是(L)再用 / 搜尋\n" move(4, 0); outs("目前接受的格式是 [數字][單位]。 " "單位有: 年(y), 月(m), 天(d)\n" - "範例: 3m (三個月), 180d (180天), 10y (10年)\n" + "範例: 3m (三個月), 120d (120天), 10y (10年)\n" "注意不可混合輸入(例:沒有三個半月這種東西,請換算成天數)\n" ); getdata(2, 0, "請以數字跟單位(預設為天)輸入期限: ", @@ -259,8 +259,16 @@ ANSI_COLOR(1) " = 想查看某使用者為何被水桶可用(S)或是(L)再用 / 搜尋\n" move(4, 0); clrtobot(); // sprintf(datebuf, "%s", Cdatelite(&expire)); sprintf(datebuf, "%d 天", val); - prints("期限將設定為 %s之後: %s", + prints("期限將設定為 %s之後: %s\n", datebuf, Cdatelite(&expire)); + if (val > KEEP_DAYS_REGGED) { + mvprints(7, 0, ANSI_COLOR(1;31) + "注意: 超過 %d 天的設定有可能因為對方一直" + "未上站而導致帳號過期被重新註冊,\n" + " 此時同名的新帳號由於不一定是同一人所以" + "不會被禁言(水桶)。\n" ANSI_RESET, + KEEP_DAYS_REGGED); + } } assert(sizeof(reason) >= BAKUMAN_REASON_LEN); diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c index 88279b34..70c3a4ae 100644 --- a/pttbbs/mbbsd/register.c +++ b/pttbbs/mbbsd/register.c @@ -246,9 +246,8 @@ compute_user_value(const userec_t * urec, time4_t clock) return 30 - value; #endif - /* 未完成註冊者,保留 15 天 */ - /* 一般情況,保留 120 天 */ - return (urec->userlevel & PERM_LOGINOK ? 120 : 15) * 24 * 60 - value; + return (urec->userlevel & PERM_LOGINOK ? + KEEP_DAYS_REGGED : KEEP_DAYS_UNREGGED) * 24 * 60 - value; } int diff --git a/pttbbs/mbbsd/vtuikit.c b/pttbbs/mbbsd/vtuikit.c index 0af08fd9..bbb2ecae 100644 --- a/pttbbs/mbbsd/vtuikit.c +++ b/pttbbs/mbbsd/vtuikit.c @@ -169,7 +169,7 @@ mvprints(int y, int x, const char *fmt, ...) vsnprintf(buff, sizeof(buff), fmt, args); va_end(args); - mvouts(x, y, buff); + mvouts(y, x, buff); } /** |