From 3874e732f9f9b9a85df1a044137c9a083e3fc722 Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 3 Apr 2008 14:12:27 +0000 Subject: register: compact ID_RECORD title format register: use "system" in regform reject mail instead of reviewer name git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4074 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 4 ++++ mbbsd/passwd.c | 9 +++++++++ mbbsd/register.c | 10 ++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index d6bcb407..b6b7c798 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -790,6 +790,10 @@ login_query(void) move(22, 0); refresh(); clrtoeol(); +#ifdef LOCAL_LOGIN_MOD + LOCAL_LOGIN_MOD(); +#endif + if (strcasecmp(str_sysop, cuser.userid) == 0){ #ifdef NO_SYSOP_ACCOUNT exit(0); diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c index d0dd4015..7145fb1a 100644 --- a/mbbsd/passwd.c +++ b/mbbsd/passwd.c @@ -102,6 +102,15 @@ passwd_update(int num, userec_t * buf) memcpy(cuser.email, u.email, sizeof(u.email)); } currutmp->alerts &= ~ALERT_PWD; + + /* + // ALERT_PWD_RELOAD: reload all! No need to write. + if (pwdfd & ALERT_PWD_RELOAD) + { + memcpy(&cuser, &u, sizeof(u)); + return 0; + } + */ } if ((pwdfd = open(fn_passwd, O_WRONLY)) < 0) exit(1); diff --git a/mbbsd/register.c b/mbbsd/register.c index 781bc74e..0207014c 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -1383,12 +1383,17 @@ regform_log2board(const RegformEntry *pre, char accept, const char *reason) char fn[PATHLEN]; char title[STRLEN]; FILE *fp = NULL; + char *title2 = NULL; snprintf(title, sizeof(title), "[審核結果] %s: %s (審核者: %s)", accept ? "通過":"退回", pre->userid, cuser.userid); - if (post_msg_fpath(BN_ID_RECORD, title, title, "[註冊系統]", fn) < 0 || + // reduce mail header title + title2 = strchr(title, ' '); + if (title2) title2++; + + if (post_msg_fpath(BN_ID_RECORD, title, title2 ? title2 : title, "[註冊系統]", fn) < 0 || ((fp = fopen(fn, "at")) == NULL)) return; @@ -1508,7 +1513,8 @@ regform_reject(const char *userid, const char *reason, const RegformEntry *pre) // multiple abbrev loop regform_print_reasons(reason, fp); fclose(fp); - mail_muser(muser, "[註冊失敗]", buf); + // mail_muser(muser, "[註冊失敗]", buf); + mail_log2id(muser.userid, "[註冊失敗]", buf, "[註冊系統]", 1, 0); } // Regform v1 API -- cgit v1.2.3