summaryrefslogtreecommitdiffstats
path: root/money.c
diff options
context:
space:
mode:
Diffstat (limited to 'money.c')
-rw-r--r--money.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/money.c b/money.c
new file mode 100644
index 00000000..6dd5b21e
--- /dev/null
+++ b/money.c
@@ -0,0 +1,37 @@
+/*
+ * 若您使用的是 Current Ptt,則不必做任何的修正。
+ * 若您使用的是其他版本的 bbs,請將 Makefile 中的 -DPTTBBS 那行取消掉,
+ * 並自行於下面的 #elseif 之後加入適當的程式碼。
+ */
+
+#define RATE 0.95
+
+int bank_moneyof(int uid){
+#ifdef PTTBBS
+ printf("[server] : uid = %d\n", uid);
+ return moneyof(uid);
+#else
+ //
+#endif
+}
+
+int bank_searchuser(char *userid){
+
+#ifdef PTTBBS
+ return searchuser(userid);
+#else
+ //
+#endif
+}
+
+int bank_deumoney(char *user, int money){
+
+#ifdef PTTBBS
+
+ money *= RATE;
+ printf("give user: %s money: %d add:%d\n", user, moneyof(bank_searchuser(user)), money);
+ deumoney(bank_searchuser(user), money);
+#else
+ //
+#endif
+}