diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-13 19:32:24 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-13 19:32:24 +0800 |
commit | ff67639e263e0e43bce9a0081d8b31d389ddeac5 (patch) | |
tree | 17ec5170efc0cb1efcab0f94ab998f4a90f4ebf1 | |
parent | ebfb5cf86e54df87bdbd952cfed7714325d530a3 (diff) | |
download | pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.tar pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.tar.gz pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.tar.bz2 pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.tar.lz pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.tar.xz pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.tar.zst pttbbs-ff67639e263e0e43bce9a0081d8b31d389ddeac5.zip |
Only sysop can set `chess country' and `restricted post.'
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2394 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/admin.c | 16 | ||||
-rw-r--r-- | mbbsd/bbs.c | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index 4f4bd90c..54cf243d 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -551,13 +551,15 @@ m_mod_board(char *bname) strlcpy(newbh.BM, genbuf, sizeof(newbh.BM)); } #ifdef CHESSCOUNTRY - snprintf(genbuf, sizeof(genbuf), "%d", bh.chesscountry); - if (getdata_str(16, 0, "設定棋國 (0)無 (1)五子棋 (2)象棋", ans, - sizeof(ans), LCECHO, genbuf)){ - newbh.chesscountry = atoi(ans); - if (newbh.chesscountry > CHESSCODE_MAX || - newbh.chesscountry < CHESSCODE_NONE) - newbh.chesscountry = bh.chesscountry; + if (HAS_PERM(PERM_SYSOP)) { + snprintf(genbuf, sizeof(genbuf), "%d", bh.chesscountry); + if (getdata_str(16, 0, "設定棋國 (0)無 (1)五子棋 (2)象棋", ans, + sizeof(ans), LCECHO, genbuf)){ + newbh.chesscountry = atoi(ans); + if (newbh.chesscountry > CHESSCODE_MAX || + newbh.chesscountry < CHESSCODE_NONE) + newbh.chesscountry = bh.chesscountry; + } } #endif /* defined(CHESSCOUNTRY) */ if (HAS_PERM(PERM_SYSOP|PERM_BOARD)) { diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 2bb56bed..dfdc2841 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2489,7 +2489,7 @@ change_localsave(int ent, fileheader_t * fhdr, char *direct) static int change_restrictedpost(int ent, fileheader_t * fhdr, char *direct){ boardheader_t *bp; - if (!((currmode & MODE_BOARD) || HAS_PERM(PERM_SYSOP))) + if (HAS_PERM(PERM_SYSOP)) return DONOTHING; bp = getbcache(currbid); |