From ff3afd480dad5adc0404dc2a747508de95c5c32e Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 9 May 2003 07:53:55 +0000 Subject: fix last commit bug git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@829 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 9c360550..77dc98e3 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1,4 +1,4 @@ -/* $Id: mbbsd.c,v 1.72 2003/05/09 07:43:57 victor Exp $ */ +/* $Id: mbbsd.c,v 1.73 2003/05/09 07:53:55 victor Exp $ */ #include "bbs.h" #define SOCKET_QLEN 4 @@ -884,14 +884,15 @@ user_login() if (!PERM_HIDE(currutmp)) cuser.lastlogin = login_start_time; - if (login_start_time - cuser.firstlogin > (FOREIGN_REG_DAY - 5) * 24 * 3600){ - mail_muser(cuser, "[出入境管理局]", "etc/foreign_expired_warn"); - } - else if (login_start_time - cuser.firstlogin > FOREIGN_REG_DAY * 24 * 3600){ - cuser.userlevel &= ~(PERM_LOGINOK | PERM_POST); - mail_muser(cuser, "[出入境管理局]", "etc/foreign_expired"); + if (cuser.foreign & FOREIGN){ + if (login_start_time - cuser.firstlogin > (FOREIGN_REG_DAY - 5) * 24 * 3600){ + mail_muser(cuser, "[出入境管理局]", "etc/foreign_expired_warn"); + } + else if (login_start_time - cuser.firstlogin > FOREIGN_REG_DAY * 24 * 3600){ + cuser.userlevel &= ~(PERM_LOGINOK | PERM_POST); + mail_muser(cuser, "[出入境管理局]", "etc/foreign_expired"); + } } - passwd_update(usernum, &cuser); for (i = 0; i < NUMVIEWFILE; i++) -- cgit v1.2.3