diff options
-rw-r--r-- | pttbbs/mbbsd/io.c | 3 | ||||
-rw-r--r-- | pttbbs/mbbsd/menu.c | 8 | ||||
-rw-r--r-- | pttbbs/mbbsd/register.c | 4 | ||||
-rw-r--r-- | pttbbs/mbbsd/talk.c | 3 |
4 files changed, 9 insertions, 9 deletions
diff --git a/pttbbs/mbbsd/io.c b/pttbbs/mbbsd/io.c index 4ce4ed87..a67eea55 100644 --- a/pttbbs/mbbsd/io.c +++ b/pttbbs/mbbsd/io.c @@ -154,7 +154,8 @@ process_pager_keys(int ch) switch (ch) { case Ctrl('U') : - if (!is_login_ready || !HasUserPerm(PERM_BASIC)) + if (!is_login_ready || !HasUserPerm(PERM_BASIC) || + HasUserPerm(PERM_VIOLATELAW)) return ch; if ( currutmp->mode == EDITING || currutmp->mode == LUSERS || diff --git a/pttbbs/mbbsd/menu.c b/pttbbs/mbbsd/menu.c index a2cec88f..60408d0a 100644 --- a/pttbbs/mbbsd/menu.c +++ b/pttbbs/mbbsd/menu.c @@ -214,7 +214,9 @@ ZA_Select(void) { int k; - if (!is_login_ready) + if (!is_login_ready || + !HasUserPerm(PERM_BASIC) || + HasUserPerm(PERM_VIOLATELAW)) return 0; // TODO refresh status bar? @@ -451,10 +453,6 @@ domenu(int menu_index, const char *cmdtitle, int cmd, const commands_t cmdtable[ i = -1; switch (cmd) { case Ctrl('Z'): - if (!HasUserPerm(PERM_BASIC)) { - i = lastcmdptr; - break; - } ZA_Select(); // we'll have za loop later. refscreen = YEA; i = lastcmdptr; diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c index 3afb08bf..08d1b228 100644 --- a/pttbbs/mbbsd/register.c +++ b/pttbbs/mbbsd/register.c @@ -588,9 +588,9 @@ new_register(void) (minute = check_and_expire_account(id, &xuser, 0)) >= 0) { if (minute == 999999) // XXX magic number. It should be greater than MAX_USERS at least. - outs("此代號已經有人使用 是不死之身"); + outs("此代號已經有人使用 是不死之身\n"); else { - prints("此代號已經有人使用 還有 %d 天才過期 \n", + prints("此代號已經有人使用 還有 %d 天才過期\n", minute / (60 * 24) + 1); } } diff --git a/pttbbs/mbbsd/talk.c b/pttbbs/mbbsd/talk.c index a02df0d4..a34b6237 100644 --- a/pttbbs/mbbsd/talk.c +++ b/pttbbs/mbbsd/talk.c @@ -2693,7 +2693,8 @@ t_users(void) int mode0 = currutmp->mode; int stat0 = currstat; - if (!HasBasicUserPerm(PERM_LOGINOK)) + if (!HasBasicUserPerm(PERM_LOGINOK) || + HasUserPerm(PERM_VIOLATELAW)) return 0; assert(strncmp(cuser.userid, currutmp->userid, IDLEN)==0); |