summaryrefslogtreecommitdiffstats
path: root/mbbsd/syspost.c
diff options
context:
space:
mode:
authorlwms <lwms@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-08 20:06:06 +0800
committerlwms <lwms@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-08 20:06:06 +0800
commitb4fa6d0989f02802609107a4d61cb4b492ef08a2 (patch)
tree3188d640a52a311df5db6f2d7fa7b0ec8e941d05 /mbbsd/syspost.c
parent513fb9ca61afd4b43541f1294c73ff81f5a983b2 (diff)
downloadpttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.tar
pttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.tar.gz
pttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.tar.bz2
pttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.tar.lz
pttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.tar.xz
pttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.tar.zst
pttbbs-b4fa6d0989f02802609107a4d61cb4b492ef08a2.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@152 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/syspost.c')
-rw-r--r--mbbsd/syspost.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c
index 474e8b65..a2cdcea8 100644
--- a/mbbsd/syspost.c
+++ b/mbbsd/syspost.c
@@ -1,4 +1,4 @@
-/* $Id: syspost.c,v 1.3 2002/04/28 19:35:29 in2 Exp $ */
+/* $Id: syspost.c,v 1.4 2002/05/08 12:04:49 lwms Exp $ */
#include <stdio.h>
#include <string.h>
#include <time.h>
@@ -100,3 +100,28 @@ void post_newboard(char* bgroup, char* bname, char* bms){
cuser.userid, bname, bgroup, bms);
post_msg("Record", title, genbuf, "[系統]");
}
+
+void post_give_money(char *sysopid, char *userid, int money) {
+ FILE *fp;
+ fileheader_t fhdr;
+ time_t now = time(0);
+ char genbuf[200];
+
+ strcpy(genbuf, "boards/S/Security");
+ stampfile(genbuf, &fhdr);
+ if(!(fp = fopen(genbuf,"w")))
+ return;
+
+ fprintf(fp, "作者: [系統安全局] 看板: Security\n"
+ "標題: [公安報告] 紅包機使用報告\n"
+ "時間: %s\n", ctime(&now));
+ fprintf (fp, " 站長\033[1;32m%s給%s\033[m%d元\n",
+ sysopid, userid, money);
+
+ sprintf(fhdr.title, "[公安報告] 站長%s使用紅包機報告",
+ cuser.userid);
+ strcpy(fhdr.owner, "[系統安全局]");
+ append_record("boards/S/Security/.DIR", &fhdr, sizeof(fhdr));
+}
+
+