summaryrefslogtreecommitdiffstats
path: root/mbbsd/admin.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-13 19:32:24 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-13 19:32:24 +0800
commitff67639e263e0e43bce9a0081d8b31d389ddeac5 (patch)
tree17ec5170efc0cb1efcab0f94ab998f4a90f4ebf1 /mbbsd/admin.c
parentebfb5cf86e54df87bdbd952cfed7714325d530a3 (diff)
downloadpttbbs-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
Diffstat (limited to 'mbbsd/admin.c')
-rw-r--r--mbbsd/admin.c16
1 files changed, 9 insertions, 7 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)) {