From cae5ea8fa7f94b023e4d4cc8754854ac7ae9c7aa Mon Sep 17 00:00:00 2001 From: kcwu Date: Sat, 22 Sep 2007 21:06:04 +0000 Subject: Delay when give money. The give-tax design is stupid, which make user tend to flood server. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3570 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cal.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mbbsd') diff --git a/mbbsd/cal.c b/mbbsd/cal.c index faafe2b5..b99d89e4 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -413,6 +413,13 @@ int do_give_money(char *id, int uid, int money) #endif mail_redenvelop(cuser.userid, id, money - tax, getans("要自行書寫紅包袋嗎?[y/N]")); + if (money < 50) { + usleep(2000000); + } else if (money < 200) { + usleep(500000); + } else { + usleep(100000); + } return 0; } return -1; -- cgit v1.2.3