summaryrefslogtreecommitdiffstats
path: root/mbbsd/menu.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-19 13:46:57 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-19 13:46:57 +0800
commit8a63959c47d4f26fe3017c9518ce26f798800edc (patch)
tree5c02289c4bf2d171b9241e0443f238f29a7ed544 /mbbsd/menu.c
parent7e7780dcec5fcd883a7212211f789cbaaadd5853 (diff)
downloadpttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.tar
pttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.tar.gz
pttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.tar.bz2
pttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.tar.lz
pttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.tar.xz
pttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.tar.zst
pttbbs-8a63959c47d4f26fe3017c9518ce26f798800edc.zip
- change GUEST rule to checking PERM_BASIC.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4203 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/menu.c')
-rw-r--r--mbbsd/menu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c
index ddacb7c1..ae0846fe 100644
--- a/mbbsd/menu.c
+++ b/mbbsd/menu.c
@@ -1,9 +1,11 @@
/* $Id$ */
#include "bbs.h"
+// UNREGONLY 改為由 BASIC 來判斷是否為 guest.
+
#define CheckMenuPerm(x) \
( (x == MENU_UNREGONLY)? \
- ((cuser.userlevel == 0 ||HasUserPerm(PERM_LOGINOK))?0:1) :\
+ ((!HasUserPerm(PERM_BASIC) || HasUserPerm(PERM_LOGINOK))?0:1) :\
((x) ? HasUserPerm(x) : 1))
/* help & menu processring */
@@ -721,6 +723,9 @@ User(void)
int
Xyz(void)
{
+ if (strcmp(cuser.userid, "piaip") == 0)
+ x_file();
+ else
domenu(M_XMENU, "工具程式", 'M', xyzlist);
return 0;
}