diff options
-rw-r--r-- | pttbbs/mbbsd/cal.c | 11 | ||||
-rw-r--r-- | pttbbs/mbbsd/talk.c | 5 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/cal.c b/pttbbs/mbbsd/cal.c index 3e959cb7..62ab2fa3 100644 --- a/pttbbs/mbbsd/cal.c +++ b/pttbbs/mbbsd/cal.c @@ -323,12 +323,11 @@ give_money_ui(const char *userid) // like user pw/id/... vs_hdr("給予金錢"); - if (!userid || !*userid) - usercomplete("這位幸運兒的id: ", id); - else { - strlcpy(id, userid, sizeof(id)); - prints("這位幸運兒的id: %s\n", id); - } + if (!userid || !*userid || strcmp(userid, cuser.userid) == 0) + userid = NULL; + + // XXX should we prevent editing if userid is already assigned? + usercomplete2("這位幸運兒的id: ", id, userid); move(2, 0); clrtobot(); diff --git a/pttbbs/mbbsd/talk.c b/pttbbs/mbbsd/talk.c index 8af21abb..4586810e 100644 --- a/pttbbs/mbbsd/talk.c +++ b/pttbbs/mbbsd/talk.c @@ -3045,6 +3045,7 @@ userlist(void) } break; + /* case 'G': if (HasUserPerm(PERM_LOGINOK)) { p_give(); @@ -3052,10 +3053,10 @@ userlist(void) redrawall = redraw = 1; } break; + */ case 'g': - if (HasUserPerm(PERM_LOGINOK) && - strcmp(uentp->userid, cuser.userid) != 0) { + if (HasUserPerm(PERM_LOGINOK) && cuser.money) { give_money_ui(uentp->userid); redrawall = redraw = 1; } |