summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-05 15:58:09 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-05 15:58:09 +0800
commit85dd021ec967d2f58a531912a78ed9a956dd10dc (patch)
treee6df2e059864c3c9dd37ef29c4eba0d9d44df823 /mbbsd
parenta2ab5ac739305ff4bd756e829f7f4e5c3b71d9a9 (diff)
downloadpttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.tar
pttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.tar.gz
pttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.tar.bz2
pttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.tar.lz
pttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.tar.xz
pttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.tar.zst
pttbbs-85dd021ec967d2f58a531912a78ed9a956dd10dc.zip
count #Welcomes in account to SHM instead of mbbsd.c
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1029 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index a4c3abe9..a20188a6 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.87 2003/06/27 07:44:02 in2 Exp $ */
+/* $Id: mbbsd.c,v 1.88 2003/07/05 07:58:09 in2 Exp $ */
#include "bbs.h"
#define SOCKET_QLEN 4
@@ -780,19 +780,10 @@ user_login()
#ifndef MULTI_WELCOME_LOGIN
more("etc/Welcome_login", NA);
#else
- char buf[80];
- int nScreens;
-
- for (nScreens = 0; nScreens < 5; ++nScreens) {
- snprintf(buf, sizeof(buf), "etc/Welcome_login.%d", nScreens);
- if (access(buf, 0) < 0)
- break;
- }
- if (nScreens == 0) {
- //multi screen error ?
- more("etc/Welcome_login", NA);
- } else {
- snprintf(buf, sizeof(buf), "etc/Welcome_login.%d", (int)login_start_time % nScreens);
+ if( SHM->GV2.e.nWelcomes ){
+ char buf[80];
+ snprintf(buf, sizeof(buf), "etc/Welcome_login.%d",
+ (int)login_start_time % SHM->GV2.e.nWelcomes);
more(buf, NA);
}
#endif