summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-28 17:16:06 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-28 17:16:06 +0800
commit95fcb25895d67baf420639b27c528053eb11e6ec (patch)
treeb95a0596b8de7d9d6d7559c4abf9b58418ce5cc4 /util
parent151dbb8fb5790586ea32cd45a1cbc268a4516b16 (diff)
downloadpttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.tar
pttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.tar.gz
pttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.tar.bz2
pttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.tar.lz
pttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.tar.xz
pttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.tar.zst
pttbbs-95fcb25895d67baf420639b27c528053eb11e6ec.zip
utility update
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2972 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/bbsctl.c1
-rw-r--r--util/shmctl.c70
2 files changed, 47 insertions, 24 deletions
diff --git a/util/bbsctl.c b/util/bbsctl.c
index 848fc999..f986ba33 100644
--- a/util/bbsctl.c
+++ b/util/bbsctl.c
@@ -236,6 +236,7 @@ int permreport(int argc, char **argv)
{PERM_ACCOUNTS, "PERM_ACCOUNTS"},
{PERM_SYSSUBOP, "PERM_SYSSUBOP"},
{PERM_ACCTREG, "PERM_ACCTREG"},
+ {PERM_RELATION, "PERM_RELATION"},
{0, NULL}};
if( (fd = open(".PASSWDS", O_RDONLY)) < 0 ){
diff --git a/util/shmctl.c b/util/shmctl.c
index 8629fc4f..16fb4414 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -605,29 +605,32 @@ int listbrd(int argc, char **argv)
printf("BM:\t%s\n", b.BM);
printf("brdattr:\t%08x ", b.brdattr);
- if (b.brdattr & BRD_NOZAP) printf("BRD_NOZAP ");
- if (b.brdattr & BRD_NOCOUNT) printf("BRD_NOCOUNT ");
- if (b.brdattr & BRD_NOTRAN) printf("BRD_NOTRAN ");
- if (b.brdattr & BRD_GROUPBOARD) printf("BRD_GROUPBOARD ");
- if (b.brdattr & BRD_HIDE) printf("BRD_HIDE ");
- if (b.brdattr & BRD_POSTMASK) printf("BRD_POSTMASK ");
- if (b.brdattr & BRD_ANONYMOUS) printf("BRD_ANONYMOUS ");
- if (b.brdattr & BRD_DEFAULTANONYMOUS) printf("BRD_DEFAULTANONYMOUS ");
- if (b.brdattr & BRD_BAD) printf("BRD_BAD ");
- if (b.brdattr & BRD_VOTEBOARD) printf("BRD_VOTEBOARD ");
- if (b.brdattr & BRD_WARNEL) printf("BRD_WARNEL ");
- if (b.brdattr & BRD_TOP) printf("BRD_TOP ");
- if (b.brdattr & BRD_NORECOMMEND) printf("BRD_NORECOMMEND ");
- if (b.brdattr & BRD_BLOG) printf("BRD_BLOG ");
- if (b.brdattr & BRD_BMCOUNT) printf("BRD_BMCOUNT ");
- if (b.brdattr & BRD_SYMBOLIC) printf("BRD_SYMBOLIC ");
- if (b.brdattr & BRD_NOBOO) printf("BRD_NOBOO ");
- if (b.brdattr & BRD_LOCALSAVE) printf("BRD_LOCALSAVE ");
- if (b.brdattr & BRD_RESTRICTEDPOST) printf("BRD_RESTRICTEDPOST ");
- if (b.brdattr & BRD_GUESTPOST) printf("BRD_GUESTPOST ");
-#ifdef USE_COOLDOWN
- if (b.brdattr & BRD_COOLDOWN) printf("BRD_COOLDOWN ");
-#endif
+#define SHOWBRDATTR(x) if(b.brdattr & x) printf(#x " ");
+
+ SHOWBRDATTR(BRD_NOZAP);
+ SHOWBRDATTR(BRD_NOCOUNT);
+ SHOWBRDATTR(BRD_NOTRAN);
+ SHOWBRDATTR(BRD_GROUPBOARD);
+ SHOWBRDATTR(BRD_HIDE);
+ SHOWBRDATTR(BRD_POSTMASK);
+ SHOWBRDATTR(BRD_ANONYMOUS);
+ SHOWBRDATTR(BRD_DEFAULTANONYMOUS);
+ SHOWBRDATTR(BRD_BAD);
+ SHOWBRDATTR(BRD_VOTEBOARD);
+ SHOWBRDATTR(BRD_WARNEL);
+ SHOWBRDATTR(BRD_TOP);
+ SHOWBRDATTR(BRD_NORECOMMEND);
+ SHOWBRDATTR(BRD_BLOG);
+ SHOWBRDATTR(BRD_BMCOUNT);
+ SHOWBRDATTR(BRD_SYMBOLIC);
+ SHOWBRDATTR(BRD_NOBOO);
+ SHOWBRDATTR(BRD_LOCALSAVE);
+ SHOWBRDATTR(BRD_RESTRICTEDPOST);
+ SHOWBRDATTR(BRD_GUESTPOST);
+ SHOWBRDATTR(BRD_COOLDOWN);
+ SHOWBRDATTR(BRD_CPLOG);
+ SHOWBRDATTR(BRD_NOFASTRECMD);
+
printf("\n");
printf("post_limit_posts:\t%d\n", b.post_limit_posts);
@@ -676,15 +679,34 @@ int fixbrd(int argc, char **argv)
if(!bcache[i].brdname[0])
continue;
/* do whatever you wanna fix here. */
+
+#if 0
+ /* upgrade from old NOFASTRECMD (default pause) to new format
+ * (BM config) */
+ if(bcache[i].brdattr & BRD_NOFASTRECMD)
+ {
+ printf("board with no fastrecmd: #%d [%s]\n",
+ i+1, bcache[i].brdname);
+ bcache[i].fastrecommend_pause = 90;
+ update_brd(i);
+ }
+#endif
+
+#if 0
+ /* fix parent, hope so */
if(bcache[i].parent > MAX_BOARD) {
printf("parent: #%d [%s] *%d\n", i+1, bcache[i].brdname, bcache[i].parent);
bcache[i].parent = 0;
update_brd(i);
}
+#endif
+
+#if 0
+ /* alert wrong gid */
if(bcache[i].gid < 1) {
printf("gid: #%d [%s] *%d\n", i+1, bcache[i].brdname, bcache[i].gid);
}
-// update_brd(i);
+#endif
}
return 0;
}