summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-16 14:00:01 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-16 14:00:01 +0800
commitf1a6c4463d04cf5ea6486ef20eeb59235f944d9b (patch)
treeffd1b47b4d93b85f22b89a60fb5f97f99c7e83da
parentcf83920428b3cfdfe2a5f7d6fc10b1956851f4fa (diff)
downloadpttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.tar
pttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.tar.gz
pttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.tar.bz2
pttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.tar.lz
pttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.tar.xz
pttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.tar.zst
pttbbs-f1a6c4463d04cf5ea6486ef20eeb59235f944d9b.zip
simple regcode
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@178 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/user.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 9f5d7245..8fea34ab 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1,4 +1,4 @@
-/* $Id: user.c,v 1.16 2002/05/13 03:20:04 ptt Exp $ */
+/* $Id: user.c,v 1.17 2002/05/16 06:00:01 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -774,10 +774,7 @@ static int ispersonalid(char *inid)
static char *getregcode(char *buf)
{
- sprintf(buf, "%s%s%s",
- crypt(cuser.email, "PT"),
- crypt(cuser.address, "2x"),
- crypt(cuser.realname, "02"));
+ sprintf(buf, "%s", crypt(cuser.userid, "02"));
return buf;
}
@@ -826,23 +823,29 @@ static void toregister(char *email, char *genbuf, char *phone, char *career,
stand_title("�{�ҳ]�w");
move(2, 0);
outs("�z�n, �����Ĩ�ؤ覡�{��:\n"
- " 1.�z�Y�� E-Mail , �i�H�z�L E-Mail �i��{��\n"
- " �п�J�z�� E-Mail , �z�|����ڭ̱H�X�t���{�ҽX���H��\n"
- " ����� (U)ser => (R)egister ��J, �Y�i�q�L�{��\n"
+ " 1.�Y�z�� E-Mail (���������� yahoo, kimo���K�O�� E-Mail)\n"
+ " �п�J�z�� E-Mail , �ڭ̷|�H�o�t���{�ҽX���H�󵹱z\n"
+ " �����Ш� (U)ser => (R)egister ��J�{�ҽX, �Y�i�q�L�{��\n"
"\n"
- " 2.�z�Y�S�� E-Mail , �п�J x ,\n"
+ " 2.�Y�z�S�� E-Mail , �п�J x ,\n"
" �ڭ̷|�ѯ����˦ۼf�ֱz�����U���\n"
- "\n"
- "**********************************************************\n"
- "* �z���ӷ|�b������Q����������{�ҫH��, �Y�L�[������λ{ *\n"
- "* �ҽX���~�г·Э��s��g�@���Χ�Τ�ʻ{�� :) *\n"
- "**********************************************************\n");
+ "************************************************************\n"
+ "* �`�N! *\n"
+ "* �z���ӷ|�b��J������Q����������{�ҫH, �Y�L�[������, *\n"
+ "* �ο�J��o�ͻ{�ҽX���~, �·Э���@�� E-Mail �Χ��ʻ{�� *\n"
+ "************************************************************\n");
while( 1 ){
email[0] = 0;
getfield(15, "�����{�ҥ�", "E-Mail Address", email, 50);
- if( strcmp(email, "x") == 0 || strcmp(email, "X") == 0 ||
- isvaildemail(email) )
+ if( strcmp(email, "x") == 0 || strcmp(email, "X") == 0 )
break;
+ else if( isvaildemail(email) ){
+ char yn[3];
+ getdata(16, 0, "�ЦA���T�{�z��J�� E-Mail ��m���T��? [y/N]",
+ yn, sizeof(yn), LCECHO);
+ if( yn[0] == 'Y' || yn[0] == 'y' )
+ break;
+ }
else{
move(17, 0);
prints("���w�� E-Mail ���X�k,"
@@ -872,12 +875,12 @@ static void toregister(char *email, char *genbuf, char *phone, char *career,
strncpy(cuser.justify, genbuf, REGLEN);
sethomefile(buf, cuser.userid, "justify");
}
+ sprintf(buf, "�z�b "BBSNAME" ���{�ҽX: %s", getregcode(genbuf));
strcpy(tmp, cuser.userid);
strcpy(cuser.userid, "SYSOP");
- sprintf(buf, "�z�b "BBSNAME" ���{�ҽX: %s", getregcode(genbuf));
bsmtp("etc/registermail", buf, email, 0);
strcpy(cuser.userid, tmp);
- outs("\n\n\n�ڭ̧Y�N�H�X�{�ҫH (�i��n�·бz����T����)\n"
+ outs("\n\n\n�ڭ̧Y�N�H�X�{�ҫH (�z���ӷ|�b 10 ����������)\n"
"�����z�i�H��ڻ{�ҫH���D���{�ҽX\n"
"��J�� (U)ser -> (R)egister ��N�i�H�������U");
pressanykey();
@@ -937,10 +940,11 @@ int u_register(void)
clear();
stand_title("EMail�{��");
move(2, 0);
- prints("%s(%s) �z�n�A�п�J�z���{�ҽX�ο�J x���� E-Mail ",
+ prints("%s(%s) �z�n�A�п�J�z���{�ҽX�C\n"
+ "�αz�i�H��J x�ӭ��s��g E-Mail �Χ�ѯ�����ʻ{��",
cuser.userid, cuser.username);
inregcode[0] = 0;
- getdata(10, 0, "�z���{�ҽX: ", inregcode, sizeof(inregcode), DOECHO);
+ getdata(10, 0, "�z����J: ", inregcode, sizeof(inregcode), DOECHO);
if( strcmp(inregcode, getregcode(regcode)) == 0 ){
int unum;
if( (unum = getuser(cuser.userid)) == 0 ){