summaryrefslogtreecommitdiffstats
path: root/mbbsd/card.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 00:50:34 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 00:50:34 +0800
commit98acb18b8e6b7d7bfdd49809774e61328ef7f7a5 (patch)
treee1f04943a2f84e4755ee13de50aa1f6acde2d951 /mbbsd/card.c
parenteb94f525ab29b0c82e70fa895d2e343047fefd26 (diff)
downloadpttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.gz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.bz2
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.lz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.xz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.zst
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.zip
add mmap to cuser get ride of passwd_update
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1640 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/card.c')
-rw-r--r--mbbsd/card.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mbbsd/card.c b/mbbsd/card.c
index 55102df5..806c5429 100644
--- a/mbbsd/card.c
+++ b/mbbsd/card.c
@@ -1,4 +1,4 @@
-/* $Id: card.c,v 1.6 2002/07/22 19:02:00 in2 Exp $ */
+/* $Id$ */
#include "bbs.h"
static int
@@ -353,14 +353,14 @@ game_log(int type, int money)
fp = fopen(BBSHOME "/etc/card/jack.log", "a");
if (!fp)
return 0;
- fprintf(fp, "%s win:%d\n", cuser.userid, money);
+ fprintf(fp, "%s win:%d\n", cuser->userid, money);
fclose(fp);
break;
case TEN_HALF:
fp = fopen(BBSHOME "/etc/card/tenhalf.log", "a");
if (!fp)
return 0;
- fprintf(fp, "%s win:%d\n", cuser.userid, money);
+ fprintf(fp, "%s win:%d\n", cuser->userid, money);
fclose(fp);
break;
}
@@ -374,9 +374,9 @@ card_double_ask()
snprintf(buf, sizeof(buf),
"[ %s ]您現在共有 %d P幣, 現在要分組(加收 %d 元)嗎? [y/N]",
- cuser.userid, cuser.money, JACK);
+ cuser->userid, cuser->money, JACK);
reload_money();
- if (cuser.money < JACK)
+ if (cuser->money < JACK)
return 0;
getdata(20, 0, buf, buf2, sizeof(buf2), LCECHO);
if (buf2[0] == 'y' || buf2[0] == 'Y')
@@ -390,7 +390,7 @@ card_ask()
char buf[100], buf2[3];
snprintf(buf, sizeof(buf), "[ %s ]您現在共有 %d P幣, 還要加牌嗎? [y/N]",
- cuser.userid, cuser.money);
+ cuser->userid, cuser->money);
getdata(20, 0, buf, buf2, sizeof(buf2), LCECHO);
if (buf2[0] == 'y' || buf2[0] == 'Y')
return 1;
@@ -541,7 +541,7 @@ g_card_jack()
setutmpmode(JACK_CARD);
while (1) {
reload_money();
- if (cuser.money < JACK) {
+ if (cuser->money < JACK) {
outs("您的錢不夠唷!去多發表些有意義的文章再來~~~");
return 0;
}
@@ -642,7 +642,7 @@ g_ten_helf()
setutmpmode(TENHALF);
while (1) {
reload_money();
- if (cuser.money < TEN_HALF) {
+ if (cuser->money < TEN_HALF) {
outs("您的錢不夠唷!去多發表些有意義的文章再來~~~");
return 0;
}