summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/bbs.c10
-rw-r--r--util/newvers.sh21
2 files changed, 26 insertions, 5 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index f342527c..d3382389 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2916,11 +2916,6 @@ b_config(void)
(bp->brdattr & BRD_NORECOMMEND) ?
ANSI_COLOR(1)"不可":"可以");
- prints( " " ANSI_COLOR(1;36) "i" ANSI_RESET
- " - 推文時 %s" ANSI_RESET " 記錄來源 IP\n",
- (bp->brdattr & BRD_IPLOGRECMD) ?
- ANSI_COLOR(1)"要":"不用");
-
#ifndef OLDRECOMMEND
prints( " " ANSI_COLOR(1;36) "b" ANSI_RESET
" - %s " ANSI_RESET "噓文\n",
@@ -2948,6 +2943,11 @@ b_config(void)
outs("\n");
}
+ prints( " " ANSI_COLOR(1;36) "i" ANSI_RESET
+ " - 推文時 %s" ANSI_RESET " 記錄來源 IP\n",
+ (bp->brdattr & BRD_IPLOGRECMD) ?
+ ANSI_COLOR(1)"要":"不用");
+
#ifdef USE_AUTOCPLOG
prints( " " ANSI_COLOR(1;36) "x" ANSI_RESET
" - 轉錄文章時 %s " ANSI_RESET "自動記錄\n",
diff --git a/util/newvers.sh b/util/newvers.sh
index 7f0a994f..e730853e 100644
--- a/util/newvers.sh
+++ b/util/newvers.sh
@@ -1,8 +1,29 @@
#!/bin/sh
# $Id: newvers.sh,v 1.2 2003/06/22 14:45:17 in2 Exp $
+# prevent chinese logs
+LC_ALL=en_US.UTF-8
+export LC_ALL
+
t=`date`
+# are we working in CVS?
+if [ -d ".svn" ] ; then
+
+ #determine branch
+ branch=`svn info | grep '^URL: ' | sed 's/.*\/pttbbs\/\([a-zA-Z0-9_\-\.]*\)\/pttbbs\/.*/\1/'`
+ branch="$branch "
+
+ #determine rev
+ rev=`svn info | grep Revision | sed 's/Revision: /r/'`
+
+ if [ "$rev" != "" ]
+ then
+ t="$t, $branch$rev"
+ fi
+
+fi
+
cat << EOF > vers.c
char * const compile_time = "${t}";
EOF