summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pttbbs/mbbsd/io.c2
-rw-r--r--pttbbs/mbbsd/mbbsd.c11
-rw-r--r--pttbbs/mbbsd/menu.c13
3 files changed, 20 insertions, 6 deletions
diff --git a/pttbbs/mbbsd/io.c b/pttbbs/mbbsd/io.c
index 0599944d..4ce4ed87 100644
--- a/pttbbs/mbbsd/io.c
+++ b/pttbbs/mbbsd/io.c
@@ -154,7 +154,7 @@ process_pager_keys(int ch)
switch (ch)
{
case Ctrl('U') :
- if (!is_login_ready)
+ if (!is_login_ready || !HasUserPerm(PERM_BASIC))
return ch;
if ( currutmp->mode == EDITING ||
currutmp->mode == LUSERS ||
diff --git a/pttbbs/mbbsd/mbbsd.c b/pttbbs/mbbsd/mbbsd.c
index 53f223b9..9b3a7baa 100644
--- a/pttbbs/mbbsd/mbbsd.c
+++ b/pttbbs/mbbsd/mbbsd.c
@@ -1194,6 +1194,9 @@ inline static void birthday_make_a_wish(const struct tm *ptime, const struct tm
inline static void check_mailbox_quota(void)
{
+ if (!HasUserPerm(PERM_READMAIL))
+ return;
+
if (chkmailbox()) do {
m_read();
} while (chkmailbox_hard_limit());
@@ -1316,6 +1319,14 @@ user_login(void)
restore_backup();
check_mailbox_quota();
+ if (HasUserPerm(PERM_VIOLATELAW) && !HasUserPerm(PERM_BASIC)) {
+ vs_hdr2(" 停權通知 ", " 部份功\能已被暫停使用");
+ outs(ANSI_COLOR(1;31) "\n\n\t抱歉,你的帳號已被停權。\n"
+ "\t詳情請至 ViolateLaw 看板搜尋你的 ID。\n" ANSI_RESET);
+ pressanykey();
+ }
+
+
// XXX 這個 check 花不少時間,有點間隔比較好
if (HasUserPerm(PERM_BM) &&
(cuser.numlogindays % 10 == 0) && // when using numlogindays, check with is_first_login_of_today
diff --git a/pttbbs/mbbsd/menu.c b/pttbbs/mbbsd/menu.c
index ad2bfc61..11810efa 100644
--- a/pttbbs/mbbsd/menu.c
+++ b/pttbbs/mbbsd/menu.c
@@ -451,8 +451,10 @@ domenu(int menu_index, const char *cmdtitle, int cmd, const commands_t cmdtable[
i = -1;
switch (cmd) {
case Ctrl('Z'):
- if (!HasUserPerm(PERM_BASIC))
+ if (!HasUserPerm(PERM_BASIC)) {
+ i = lastcmdptr;
break;
+ }
ZA_Select(); // we'll have za loop later.
refscreen = YEA;
i = lastcmdptr;
@@ -656,9 +658,7 @@ static const commands_t maillist[] = {
{m_read, PERM_READMAIL, "RRead 多功\能讀信選單"},
{m_send, PERM_LOGINOK, "RSend 站內寄信"},
{mail_list, PERM_LOGINOK, "RMail List 群組寄信"},
-// #ifdef USE_MAIL_AUTO_FORWARD
{setforward, PERM_LOGINOK, "FForward 設定信箱自動轉寄" },
-// #endif
{mail_mbox, PERM_INTERNET, "RZip UserHome 把所有私人資料打包回去"},
{built_mail_index,
PERM_LOGINOK, "SSavemail 重建信箱索引"},
@@ -949,8 +949,11 @@ static const commands_t cmdlist[] = {
{Favorite, 0, "FFavorite 【 我 的 最愛 】"},
#endif
{Class, 0, "CClass 【 分組討論區 】"},
- {Mail, PERM_BASIC, "MMail 【 私人信件區 】"},
- {Talk, 0, "TTalk 【 休閒聊天區 】"},
+ // TODO 目前很多人被停權時會變成 -R-1-3 (PERM_LOGINOK, PERM_VIOLATELAW,
+ // PERM_NOREGCODE) 沒有 PERM_READMAIL,但這樣麻煩的是他們就搞不懂發生什麼事
+ {Mail, PERM_BASIC, "MMail 【 私人信件區 】"},
+ // 有些 bot 喜歡整天 query online accounts, 所以聊天改為 LOGINOK
+ {Talk, PERM_LOGINOK, "TTalk 【 休閒聊天區 】"},
{User, PERM_BASIC, "UUser 【 個人設定區 】"},
{Xyz, 0, "XXyz 【 系統資訊區 】"},
{Play_Play, PERM_LOGINOK, "PPlay 【 娛樂與休閒 】"},