diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-07 20:55:36 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-07 20:55:36 +0800 |
commit | de4350f7a94a791a9e4ca1886cc7d711c7dfed9f (patch) | |
tree | e0993c3e765902d2abcd144852f9b3bcd014b1e9 | |
parent | ea656082b2b31c5b28ee21c190d06b87aef4b028 (diff) | |
download | pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.tar pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.tar.gz pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.tar.bz2 pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.tar.lz pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.tar.xz pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.tar.zst pttbbs-de4350f7a94a791a9e4ca1886cc7d711c7dfed9f.zip |
setmoney to 0 after registering
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1470 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/register.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c index 151a6e25..ca49400c 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -198,7 +198,7 @@ new_register() { userec_t newuser; char passbuf[STRLEN]; - int allocid, try, id; + int allocid, try, id, uid; #ifdef HAVE_USERAGREEMENT more(HAVE_USERAGREEMENT, YEA); @@ -286,7 +286,9 @@ new_register() exit(1); } setuserid(allocid, newuser.userid); - if (!dosearchuser(newuser.userid)) { + if( (uid = dosearchuser(newuser.userid)) ) + setumoney(uid, 0); + else{ fprintf(stderr, "無法建立帳號\n"); exit(1); } |