diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/mail.c | 49 | ||||
-rw-r--r-- | mbbsd/user.c | 6 |
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 |