diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 13:46:57 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 13:46:57 +0800 |
commit | 8a63959c47d4f26fe3017c9518ce26f798800edc (patch) | |
tree | 5c02289c4bf2d171b9241e0443f238f29a7ed544 | |
parent | 7e7780dcec5fcd883a7212211f789cbaaadd5853 (diff) | |
download | pttbbs-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
-rw-r--r-- | mbbsd/menu.c | 7 | ||||
-rw-r--r-- | mbbsd/register.c | 7 |
2 files changed, 12 insertions, 2 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 �ӧP�_�O�_�� 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, "�u��{��", 'M', xyzlist); return 0; } diff --git a/mbbsd/register.c b/mbbsd/register.c index 7c21cd49..0646da8d 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -732,10 +732,15 @@ check_register(void) { char fn[PATHLEN]; - if (HasUserPerm(PERM_LOGINOK)) return; + if (!HasUserPerm(PERM_BASIC)) + { + // ���v���Q�����ӬO�n���L������U�ΡC + return; + } + /* * �קK�ϥΪ̳Q�h�^���U���A�b���D�h�^����]���e�A * �S�e�X�@�����U��C |