diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-05 00:32:01 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-05 00:32:01 +0800 |
commit | 6cbe8ceb129a4490a4f7a8163c20b6687a040358 (patch) | |
tree | ef9e1f87beccc92d4a2a7a5815383720d3b97050 | |
parent | 17fb0288af795a2e07498eb27c80aca7a9ebf5be (diff) | |
download | pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.tar pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.tar.gz pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.tar.bz2 pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.tar.lz pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.tar.xz pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.tar.zst pttbbs-6cbe8ceb129a4490a4f7a8163c20b6687a040358.zip |
Overrides r2977. PLEASE DO NOT USE include/pttbbs.conf.
The better way is to write default values in include/config.h
and then make an entry in "sample/pttbbs.conf".
<recent updates always put new settings in sample/* and no one
updates only in "local" files>
A new file of sample/pttbbs_minimal.conf is added to make things clear.
And DO NOT reveal magic numbers to files in repository.
We have to change RECODE_MAGIC now...
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2983 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/config.h | 22 | ||||
-rw-r--r-- | include/pttbbs.conf | 23 | ||||
-rw-r--r-- | mbbsd/user.c | 7 | ||||
-rw-r--r-- | sample/pttbbs.conf | 3 | ||||
-rw-r--r-- | sample/pttbbs_minimal.conf | 23 |
5 files changed, 52 insertions, 26 deletions
diff --git a/include/config.h b/include/config.h index 0af774a6..b6254a08 100644 --- a/include/config.h +++ b/include/config.h @@ -9,6 +9,18 @@ #define BAN_FILE "BAN" /* 關站通告檔 */ #define LOAD_FILE "/proc/loadavg" /* for Linux */ +#ifndef BBSUSER +#define BBSUSER "bbs" +#endif + +#ifndef BBSUID +#define BBSUID (9999) +#endif + +#ifndef BBSGID +#define BBSGID (99) +#endif + #ifndef RELAY_SERVER_IP /* 寄站外信的 mail server */ #define RELAY_SERVER_IP "127.0.0.1" #endif @@ -57,8 +69,16 @@ #define MAX_FROM (300) /* 最多故鄉數 */ #endif +#ifndef THREAD_SEARCH_RANGE +#define THREAD_SEARCH_RANGE (500) +#endif + #ifndef HAVE_JCEE /* 大學聯考查榜系統 */ -#define HAVE_JCEE 1 +#define HAVE_JCEE 0 +#endif + +#ifndef MEM_CHECK +#define MEM_CHECK 0x98761234 #endif #ifndef FOREIGN_REG_DAY /* 外籍使用者試用日期上限 */ diff --git a/include/pttbbs.conf b/include/pttbbs.conf deleted file mode 100644 index 4de87cb6..00000000 --- a/include/pttbbs.conf +++ /dev/null @@ -1,23 +0,0 @@ -/* 定義 BBS 站名位址 */ -#define BBSNAME "批踢踢實業坊" /* 中文站名 */ -#define BBSENAME "PTT" /* 英文站名 */ -#define MYHOSTNAME "ptt.csie.ntu.edu.tw" /* 網路位址 */ -#define MYIP "140.112.30.142" /* IP位址 */ -#define BBSUSER "bbs" -#define BBSUID 9999 -#define BBSGID 99 - -#define THREAD_SEARCH_RANGE (500) -#define MAX_USERS 150000 -#define MAX_ACTIVE 4096 -#define MAX_CPULOAD 50 -#define MAX_FROM 512 -#define RELAY_SERVER_IP "140.112.30.143" -#define MAX_POST_MONEY 1000 -#define MAX_CHICKEN_MONEY 10000 -#define HAVE_JCEE 0 -#define TITLE_COLOR "\33[0;1;37;44m" -#define MEM_CHECK 0 -#define MEM_CHECK 0 -#define REGCODE_MAGIC "ptt1bbsXyZ" -#define THREAD_SEARCH_RANGE (500) diff --git a/mbbsd/user.c b/mbbsd/user.c index 236b932e..7424537c 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -462,7 +462,7 @@ getregcode(char *buf) buf[13] = 0; /* real encryption */ - strcpy(buf, crypt(buf, "pt")); + strcpy(buf, crypt(buf, "pd")); /* hack to prevent trailing dots */ if (buf[strlen(buf)-1] == '.') buf[strlen(buf)-1] = 'd'; @@ -1554,7 +1554,10 @@ u_register(void) do{ getdata(10, 0, "您的輸入: ", inregcode, sizeof(inregcode), DOECHO); - if (inregcode[0] == '0' && inregcode[1] == '2') + if ((inregcode[0] == '0' && inregcode[1] == '2') || + (inregcode[0] == 'p' && inregcode[1] == 't') || + 0 + ) { /* old regcode */ vmsg("您輸入的認證碼因系統昇級已失效," diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index 48183613..7eca32fb 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -179,6 +179,9 @@ /* 在轉信時附上的時區. 若在台灣, 中國大陸等地, 用預設的即可. */ //#define INNTIMEZONE "+0800 (CST)" +/* 大學聯考查榜系統 */ +//#define HAVE_JCEE (1) + /* 開啟小天使小主人功能 */ //#define PLAY_ANGEL diff --git a/sample/pttbbs_minimal.conf b/sample/pttbbs_minimal.conf new file mode 100644 index 00000000..6f865a80 --- /dev/null +++ b/sample/pttbbs_minimal.conf @@ -0,0 +1,23 @@ +/* Primary Settings MUST BE CHANGED */ +#define BBSNAME "批踢踢實業坊" /* 中文站名 */ +#define BBSENAME "PTT" /* 英文站名 */ +#define MYHOSTNAME "ptt.csie.ntu.edu.tw" /* 網路位址 */ +#define MYIP "140.112.30.142" /* IP位址 */ +#define REGCODE_MAGIC "pttbbs" /* 註冊亂數種子 */ +#define RELAY_SERVER_IP "140.112.30.143" /* 寄站外信的 server */ + +/* 下面是較常改的設定,不改也行 */ +/* Performance Settings */ +#define MAX_USERS (150000) +#define MAX_ACTIVE (4096) +#define MAX_CPULOAD (50) +#define MAX_FROM (512) + +/* Misc Settings */ +#define MEM_CHECK (0) +#define TITLE_COLOR "\33[0;1;37;44m" +#define MAX_POST_MONEY (1000) +#define MAX_CHICKEN_MONEY (10000) + +/* vim:ft=c + */ |