summaryrefslogtreecommitdiffstats
path: root/mbbsd/fav.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-22 19:37:52 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-22 19:37:52 +0800
commit73633286ba5abef91660b5e731117e7293e83529 (patch)
treee09b49efe317c671608c6de58b6647c18ad1255a /mbbsd/fav.c
parent9a6d820518d2db326a0342f6d09c8433cae5cd27 (diff)
downloadpttbbs-73633286ba5abef91660b5e731117e7293e83529.tar
pttbbs-73633286ba5abef91660b5e731117e7293e83529.tar.gz
pttbbs-73633286ba5abef91660b5e731117e7293e83529.tar.bz2
pttbbs-73633286ba5abef91660b5e731117e7293e83529.tar.lz
pttbbs-73633286ba5abef91660b5e731117e7293e83529.tar.xz
pttbbs-73633286ba5abef91660b5e731117e7293e83529.tar.zst
pttbbs-73633286ba5abef91660b5e731117e7293e83529.zip
fix 't' for admin, add docs/fav4.txt
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1364 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/fav.c')
-rw-r--r--mbbsd/fav.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/mbbsd/fav.c b/mbbsd/fav.c
index 08b837a6..ca3fc5b4 100644
--- a/mbbsd/fav.c
+++ b/mbbsd/fav.c
@@ -528,6 +528,19 @@ void fav_remove_item(short id, char type)
fav_remove(get_current_fav(), get_fav_item(id, type));
}
+fav_type_t *getadmtag(short bid)
+{
+ int i;
+ fav_t *fp = get_fav_root();
+ fav_type_t *ft;
+ for (i = 0; i < fp->DataTail; i++) {
+ ft = &fp->favh[i];
+ if (cast_board(ft)->bid == bid && is_set_attr(ft, FAVH_ADM_TAG))
+ return ft;
+ }
+ return NULL;
+}
+
fav_type_t *getboard(short bid)
{
return get_fav_item(bid, FAVT_BOARD);
@@ -705,6 +718,24 @@ fav_type_t *fav_add_board(int bid)
cast_board(ft)->bid = bid;
return ft;
}
+
+/* for administrator to move/administrate board */
+fav_type_t *fav_add_admtag(int bid)
+{
+ fav_t *fp = get_fav_root();
+ fav_type_t *ft;
+ if (is_maxsize())
+ return NULL;
+ ft = fav_item_allocate(FAVT_BOARD);
+ if (ft == NULL)
+ return NULL;
+ // turn on FAVH_ADM_TAG
+ set_attr(ft, FAVH_ADM_TAG, 1);
+ fav_add(fp, ft);
+ cast_board(ft)->bid = bid;
+ return ft;
+}
+
/* --- */
/* everything about the tag in fav mode.