summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-12-18 13:43:48 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-12-18 13:43:48 +0800
commitc00e8151331c92f9980db146b751d8c69b3804ca (patch)
tree3e085defeee4e35082a3be44c8b84df1efb9015f
parenta199c80a4305636ef88ca7aa17c68fdf27e39ab9 (diff)
downloadpttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.tar
pttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.tar.gz
pttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.tar.bz2
pttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.tar.lz
pttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.tar.xz
pttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.tar.zst
pttbbs-c00e8151331c92f9980db146b751d8c69b3804ca.zip
remove 'water' from special list
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5285 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/friend.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/friend.c b/pttbbs/mbbsd/friend.c
index ea6baccd..13529006 100644
--- a/pttbbs/mbbsd/friend.c
+++ b/pttbbs/mbbsd/friend.c
@@ -9,41 +9,40 @@
static char special_list[7] = "list.0";
static char special_des[7] = "ldes.0";
+#define FRIENDLIST_TYPES (7)
+
/* 特別名單的上限 */
-static const unsigned int friend_max[8] = {
+static const unsigned int friend_max[FRIENDLIST_TYPES] = {
MAX_FRIEND, /* FRIEND_OVERRIDE */
MAX_REJECT, /* FRIEND_REJECT */
MAX_LOGIN_INFO, /* FRIEND_ALOHA */
MAX_POST_INFO, /* FRIEND_POST */
MAX_NAMELIST, /* FRIEND_SPECIAL */
MAX_FRIEND, /* FRIEND_CANVOTE */
- MAX_FRIEND, /* BOARD_WATER */
MAX_FRIEND, /* BOARD_VISABLE */
};
/* 雖然好友跟壞人名單都是 * 2 但是一次最多load到shm只能有128 */
/* Ptt 各種特別名單的補述 */
-static char * const friend_desc[8] = {
+static char * const friend_desc[FRIENDLIST_TYPES] = {
"友誼描述:",
"惡形惡狀:",
"",
"",
"描述一下:",
"投票者描述:",
- "惡形惡狀:",
"看板會員描述"
};
/* Ptt 各種特別名單的中文敘述 */
-static char * const friend_list[8] = {
+static char * const friend_list[FRIENDLIST_TYPES] = {
"好友名單",
"壞人名單",
"上線通知",
"新文章通知",
"其它特別名單",
"私人投票名單",
- "看板禁聲名單",
"看板會員名單"
};
@@ -71,7 +70,7 @@ friend_add(const char *uident, int type, const char* des)
char fpath[PATHLEN];
setfriendfile(fpath, type);
- if (friend_count(fpath) > friend_max[type])
+ if ((unsigned int)friend_count(fpath) > friend_max[type])
return;
if ((uident[0] > ' ') && !file_exist_record(fpath, uident)) {
@@ -145,7 +144,7 @@ friend_append(int type, int count)
prints(" (%d) %-s\n", j, friend_list[(int)i]);
}
if (HasUserPerm(PERM_SYSOP) || currmode & MODE_BOARD)
- for (; i < 8; ++i)
+ for (; i < FRIENDLIST_TYPES; ++i)
if (i != type) {
++j;
prints(" (%d) %s 板的 %s\n", j, currboard,