summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/admin.c3
-rw-r--r--mbbsd/register.c3
-rw-r--r--mbbsd/user.c10
3 files changed, 11 insertions, 5 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index d659b4fa..61bf1dba 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -1344,8 +1344,9 @@ scan_register_form(const char *regfile, int automode, int neednum)
fdata[4], fdata[2], uid);
strlcpy(muser.justify, genbuf, sizeof(muser.justify));
- // XXX TODO notify users?
passwd_update(unum, &muser);
+ // XXX TODO notify users?
+ sendalert(muser.userid, ALERT_PWD_PERM); // force to reload perm
sethomefile(buf, muser.userid, "justify");
log_file(buf, LOG_CREAT, genbuf);
diff --git a/mbbsd/register.c b/mbbsd/register.c
index a9b5e911..9d0b6852 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -228,7 +228,8 @@ new_register(void)
if (minute == 999999) // XXX magic number. It should be greater than MAX_USERS at least.
outs("此代號已經有人使用 是不死之身");
else {
- prints("此代號已經有人使用 還有%d天才過期 \n", minute / (60 * 24));
+ prints("此代號已經有人使用 還有 %d 天才過期 \n",
+ minute / (60 * 24) + 1);
}
} else
break;
diff --git a/mbbsd/user.c b/mbbsd/user.c
index bcdd9510..192131c8 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -695,18 +695,22 @@ uinfo_query(userec_t *u, int adminmode, int unum)
case 'c':
Customize();
return;
+
case 'm':
do {
- getdata_str(y, 0, "電子信箱[變動要重新認證]:", buf, 50, DOECHO,
- x.email);
+ getdata_str(y, 0, "電子信箱[變動要重新認證]:", buf,
+ sizeof(x.email), DOECHO, x.email);
} while (!isvalidemail(buf) && vmsg("認證信箱不能用使用免費信箱"));
y++;
- if (strcmp(buf, x.email) && strchr(buf, '@')) {
+ // admins may want to use special names
+ if (strcmp(buf, x.email) &&
+ (strchr(buf, '@') || adminmode)) {
strlcpy(x.email, buf, sizeof(x.email));
mail_changed = 1;
delregcodefile();
}
break;
+
case '7':
violate_law(&x, unum);
return;