summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/perm.h3
-rw-r--r--mbbsd/friend.c4
-rw-r--r--mbbsd/indict.c2
-rw-r--r--mbbsd/mail.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/include/perm.h b/include/perm.h
index e129a991..03e5b432 100644
--- a/include/perm.h
+++ b/include/perm.h
@@ -52,8 +52,7 @@
#define PERM_FORWARD (PERM_BASIC) /* to do the forwarding */
#define PERM_INTERNET (PERM_LOGINOK) /* 身份認證過關的才能寄信到 Internet */
-#define HasUserPerm(x) ((x) ? cuser.userlevel & (x) : 1)
-#define HAVE_PERM(x) (cuser.userlevel&(x))
+#define HasUserPerm(x) (cuser.userlevel & (x))
#define PERM_HIDE(u) (u && (u)->userlevel & PERM_SYSOPHIDE)
#define IS_BOARD(bptr) ((bptr)->brdname[0] && \
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index 3d2898b4..04f2a395 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -136,7 +136,7 @@ friend_append(int type, int count)
++j;
prints(" (%d) %-s\n", j, friend_list[(int)i]);
}
- if (HAVE_PERM(PERM_SYSOP) || currmode & MODE_BOARD)
+ if (HasUserPerm(PERM_SYSOP) || currmode & MODE_BOARD)
for (; i < 8; ++i)
if (i != type) {
++j;
@@ -152,7 +152,7 @@ friend_append(int type, int count)
j = buf[0] - '1';
if (j >= type)
j++;
- if (!(HAVE_PERM(PERM_SYSOP) || currmode & MODE_BOARD) && j >= 5)
+ if (!(HasUserPerm(PERM_SYSOP) || currmode & MODE_BOARD) && j >= 5)
return;
} while (buf[0] < '1' || buf[0] > '9');
diff --git a/mbbsd/indict.c b/mbbsd/indict.c
index c5d530f2..a0504d61 100644
--- a/mbbsd/indict.c
+++ b/mbbsd/indict.c
@@ -15,7 +15,7 @@ addword(const char *database,char word[])
}
fgets(buf, 130, fp);
fseek(fp, 0, 2);
- if (HAVE_PERM(PERM_LOGINOK)) {
+ if (HasUserPerm(PERM_LOGINOK)) {
clear();
move(4, 0);
outs(" " ANSI_COLOR(31) "警告" ANSI_RESET ":若蓄意填寫假資料將" ANSI_COLOR(36) "砍id" ANSI_RESET "處份\n");
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 74a7f9c5..5c4cdf3e 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -159,7 +159,7 @@ setupmailusage(void)
int
chkmailbox(void)
{
- if (!HAVE_PERM(PERM_SYSOP) && !HAVE_PERM(PERM_MAILLIMIT)) {
+ if (!HasUserPerm(PERM_SYSOP) && !HasUserPerm(PERM_MAILLIMIT)) {
if(!mailkeep) setupmailusage();
m_init();
if (mailkeep > mailmaxkeep) {