summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-09 15:44:48 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-09 15:44:48 +0800
commit5da31363b72ee7074a281ea7b216e470124a32bf (patch)
tree2d56d0e92eb376043b1d3ab5f2dbfeed8132fae4 /mbbsd/mbbsd.c
parent12dac5d34534f1cf3f507ccde8b8a8f495ece4e4 (diff)
downloadpttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.tar
pttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.tar.gz
pttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.tar.bz2
pttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.tar.lz
pttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.tar.xz
pttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.tar.zst
pttbbs-5da31363b72ee7074a281ea7b216e470124a32bf.zip
foreigner identification
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@828 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index ef35cfe9..9c360550 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.71 2003/04/14 07:47:54 in2 Exp $ */
+/* $Id: mbbsd.c,v 1.72 2003/05/09 07:43:57 victor Exp $ */
#include "bbs.h"
#define SOCKET_QLEN 4
@@ -884,6 +884,14 @@ 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");
+ }
+
passwd_update(usernum, &cuser);
for (i = 0; i < NUMVIEWFILE; i++)