diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-09 16:31:15 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-09 16:31:15 +0800 |
commit | c7b5495e9dc10baf23bb3a781fc30c0a3f017aac (patch) | |
tree | ed8d6a062f046beb2ac2dc864dee17fe97cf3ac7 | |
parent | 05634a014663f9b3a9d432945b465f0dc0fde2f4 (diff) | |
download | pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.tar pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.tar.gz pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.tar.bz2 pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.tar.lz pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.tar.xz pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.tar.zst pttbbs-c7b5495e9dc10baf23bb3a781fc30c0a3f017aac.zip |
incremental upgrade support (currently DBCSAWARE only)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2814 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/mbbsd.c | 19 | ||||
-rw-r--r-- | sample/pttbbs.conf | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index d9f48758..df34d206 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1015,6 +1015,25 @@ user_login(void) if(ptime.tm_yday!=lasttime.tm_yday) STATINC(STAT_TODAYLOGIN_MAX); + { + /* If you wanna do incremental upgrade + * (like, added a function/flag that wants user to confirm againe) + * put it here. + */ + +#if defined(DBCSAWARE) && defined(DBCSAWARE_UPGRADE_STARTTIME) + // define the real time you upgraded in your pttbbs.conf + if(cuser.lastlogin < DBCSAWARE_UPGRADE_STARTTIME) + { + if (u_detectDBCSAwareEvilClient()) + cuser.uflag &= ~DBCSAWARE_FLAG; + else + cuser.uflag |= DBCSAWARE_FLAG; + } +#endif + + } + if (!PERM_HIDE(currutmp)) { if(ptime.tm_yday!=lasttime.tm_yday) STATINC(STAT_TODAYLOGIN_MIN); diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index 8e5cb552..e87e34f6 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -122,6 +122,9 @@ * 但注意這會吃不少 CPU */ //#define DBCSAWARE_GETDATA //#define DBCSAWARE_EDIT +/* 因為 DBCS 要先偵測,所以可以利用指定下面的時間來判斷使用者有否偵測過 + * 請換成你真正上線的時間 (time_t) */ +//#define DBCSAWARE_UPGRADE_STARTTIME (0) /* 使用新式的 pmore (piaip's more) 代替舊式 bug 抓不完的 more */ #define USE_PIAIP_MORE |