From 85dd021ec967d2f58a531912a78ed9a956dd10dc Mon Sep 17 00:00:00 2001 From: in2 Date: Sat, 5 Jul 2003 07:58:09 +0000 Subject: 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 --- mbbsd/mbbsd.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'mbbsd') 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 -- cgit v1.2.3