summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-24 11:13:52 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-24 11:13:52 +0800
commiteb5c071f4beecf378262ad7d668f7be00e42349f (patch)
tree44bc4ee0b5e2fe1776dcddad3426235cc509da68 /mbbsd
parent5bdce8c576bfb0bc0d997f8524f43d1adf1401c7 (diff)
downloadpttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.tar
pttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.tar.gz
pttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.tar.bz2
pttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.tar.lz
pttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.tar.xz
pttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.tar.zst
pttbbs-eb5c071f4beecf378262ad7d668f7be00e42349f.zip
fix bug of email justify
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2865 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mail.c49
-rw-r--r--mbbsd/user.c6
2 files changed, 2 insertions, 53 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index aab8e145..d23b6348 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -1700,52 +1700,3 @@ load_mailalert(const char *userid)
}
return 0;
}
-
-#ifdef EMAIL_JUSTIFY
-static void
-mail_justify(userec_t muser)
-{
- fileheader_t mhdr;
- char title[128], buf1[80];
- FILE *fp;
-
- sethomepath(buf1, muser.userid);
- stampfile(buf1, &mhdr);
- unlink(buf1);
- strlcpy(mhdr.owner, cuser.userid, sizeof(mhdr.owner));
- strncpy(mhdr.title, "[¼f®Ö³q¹L]", TTLEN);
- mhdr.filemode = 0;
-
- if (valid_ident(muser.email) && !invalidaddr(muser.email)) {
- char title[80], *ptr;
- unsigned short checksum; /* 16-bit is enough */
- char ch;
-
- checksum = searchuser(muser.userid);
- ptr = muser.email;
- while ((ch = *ptr++)) {
- if (ch <= ' ')
- break;
- if (ch >= 'A' && ch <= 'Z')
- ch |= 0x20;
- checksum = (checksum << 1) ^ ch;
- }
-
- snprintf(title, sizeof(title), "[PTT BBS]To %s(%d:%d) [User Justify]",
- muser.userid, getuser(muser.userid) + MAGIC_KEY, checksum);
- if (
-#ifndef USE_BSMTP
- bbs_sendmail(NULL, title, muser.email)
-#else
- bsmtp(NULL, title, muser.email, MQ_JUSTIFY)
-#endif
- <0)
- Link(BBSHOME "/etc/bademail", buf1);
- else
- Link(BBSHOME "/etc/replyemail", buf1);
- } else
- Link(BBSHOME "/etc/bademail", buf1);
- sethomedir(title, muser.userid);
- append_record_forward(title, &mhdr, sizeof(mhdr), muser.userid);
-}
-#endif /* EMAIL_JUSTIFY */
diff --git a/mbbsd/user.c b/mbbsd/user.c
index c88d26d9..0bb49f4a 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -787,10 +787,7 @@ uinfo_query(userec_t *u, int adminmode, int unum)
}
memcpy(u, &x, sizeof(x));
if (mail_changed) {
-#ifdef EMAIL_JUSTIFY
x.userlevel &= ~PERM_LOGINOK;
- mail_justify();
-#endif
}
if (i == QUIT) {
char src[STRLEN], dst[STRLEN];
@@ -1049,6 +1046,7 @@ removespace(char *s)
return index;
}
+
static char *
getregcode(unsigned char *buf)
{
@@ -1113,6 +1111,7 @@ _debug_testregcode()
}
#endif
+
static int
isvalidemail(const char *email)
{
@@ -1245,7 +1244,6 @@ toregister(char *email, char *genbuf, char *phone, char *career,
strncpy(cuser.justify, genbuf, REGLEN);
sethomefile(buf, cuser.userid, "justify");
}
-
/*
* It is intended to use BBSENAME instead of BBSNAME here.
* Because recently many poor users with poor mail clients