summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-24 15:41:23 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-24 15:41:23 +0800
commit81e63db3261047dc0a470f4ab3ad8649a9339737 (patch)
tree3eb71252a0b21db4f94c84d6ebb7ffb632eca8bf
parent9c0dcfe954a94e20b8a30604a0b475cace5c52c1 (diff)
downloadpttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.tar
pttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.tar.gz
pttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.tar.bz2
pttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.tar.lz
pttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.tar.xz
pttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.tar.zst
pttbbs-81e63db3261047dc0a470f4ab3ad8649a9339737.zip
* allow post editing in give_money.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4979 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/cal.c11
-rw-r--r--pttbbs/mbbsd/talk.c5
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;
}