diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-22 15:23:22 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-22 15:23:22 +0800 |
commit | b9b08dc09359d17ea223c984d21978c996960577 (patch) | |
tree | fb52445f639a325e17dd50cd7946b2544782996a /mbbsd/gamble.c | |
parent | b9a77ec8210f2eb69074772a230782acbc1017e3 (diff) | |
download | pttbbs-b9b08dc09359d17ea223c984d21978c996960577.tar pttbbs-b9b08dc09359d17ea223c984d21978c996960577.tar.gz pttbbs-b9b08dc09359d17ea223c984d21978c996960577.tar.bz2 pttbbs-b9b08dc09359d17ea223c984d21978c996960577.tar.lz pttbbs-b9b08dc09359d17ea223c984d21978c996960577.tar.xz pttbbs-b9b08dc09359d17ea223c984d21978c996960577.tar.zst pttbbs-b9b08dc09359d17ea223c984d21978c996960577.zip |
o
fix openticket tick;
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@332 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/gamble.c')
-rw-r--r-- | mbbsd/gamble.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index ff1c39d6..917d71b6 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -1,4 +1,4 @@ -/* $Id: gamble.c,v 1.16 2002/06/19 13:28:16 lwms Exp $ */ +/* $Id: gamble.c,v 1.17 2002/06/22 07:23:22 ptt Exp $ */ #include "bbs.h" #ifndef _BBS_UTIL_C_ @@ -320,7 +320,8 @@ int openticket(int bid) { fclose(fp1); setbfile(buf, bh->brdname, FN_TICKET_END); - unlink(buf); + setbfile(path, bh->brdname, FN_TICKET_LOCK); + rename(buf, path); /* 以下是給錢動作 */ @@ -346,7 +347,7 @@ int openticket(int bid) { } else continue; - if((uid=getuser(userid))==0) continue; + if((uid=searchuser(userid))==0) continue; deumoney(uid, money * i); mail_id(userid, buf, "etc/ticket.win", "Ptt賭場"); } @@ -366,6 +367,8 @@ int openticket(int bid) { unlink(buf); setbfile(buf, bh->brdname, FN_TICKET_USER); unlink(buf); + setbfile(buf, bh->brdname, FN_TICKET_LOCK); + unlink(buf); exit(1); return 0; } |