summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-03 15:10:38 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-03 15:10:38 +0800
commita2a653b72c1f5c6920f03d13a52b0a2ea3631cb8 (patch)
tree2c99185aec035b80ae4d5496e4f125b4e9e78492 /mbbsd/cal.c
parent76c447fca47270d730fe8258ad52e4696d097d55 (diff)
downloadpttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.tar
pttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.tar.gz
pttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.tar.bz2
pttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.tar.lz
pttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.tar.xz
pttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.tar.zst
pttbbs-a2a653b72c1f5c6920f03d13a52b0a2ea3631cb8.zip
Security Update
(1) **s (Ptt_prints): Only information can be queried by others will be revealed. i.e., **b(birthday), **u(utmp number) will be removed **m(money) will show level messages instead of real number (2) Reply will show as **X instead of converted message (3) Ansi (^V) mode in editor will display as **X. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2878 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r--mbbsd/cal.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 8658e850..bf4572b6 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -58,6 +58,24 @@ unlockutmpmode(void)
/* 使用錢的函數 */
#define VICE_NEW "vice.new"
+const char*
+money_level(int money)
+{
+ int i = 0;
+
+ static const char *money_msg[] =
+ {
+ "債台高築", "赤貧", "清寒", "普通", "小康",
+ "小富", "中富", "大富翁", "富可敵國", "比爾蓋\天", NULL
+ };
+ while (money_msg[i] && money > 10)
+ i++, money /= 10;
+
+ if(!money_msg[i])
+ i--;
+ return money_msg[i];
+}
+
/* Heat:發票 */
int
vice(int money, const char *item)