diff options
-rw-r--r-- | include/proto.h | 3 | ||||
-rw-r--r-- | mbbsd/syspost.c | 27 |
2 files changed, 28 insertions, 2 deletions
diff --git a/include/proto.h b/include/proto.h index 66267a52..743575f8 100644 --- a/include/proto.h +++ b/include/proto.h @@ -1,4 +1,4 @@ -/* $Id: proto.h,v 1.14 2002/05/11 16:42:43 in2 Exp $ */ +/* $Id: proto.h,v 1.15 2002/05/20 15:38:23 lwms Exp $ */ #ifndef INCLUDE_PROTO_H #define INCLUDE_PROTO_H @@ -422,6 +422,7 @@ int is_uBM(char *list, char *id); void post_newboard(char *bgroup, char *bname, char *bms); void post_violatelaw(char *crime, char *police, char *reason, char *result); void post_change_perm(int oldperm, int newperm, char *sysopid, char *userid); +void give_money_post(char *userid, int money); /* talk */ int cmpwatermtime(const void *a, const void *b); diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c index 6145be26..654d6c35 100644 --- a/mbbsd/syspost.c +++ b/mbbsd/syspost.c @@ -1,4 +1,4 @@ -/* $Id: syspost.c,v 1.6 2002/05/13 03:20:04 ptt Exp $ */ +/* $Id: syspost.c,v 1.7 2002/05/20 15:41:37 lwms Exp $ */ #include <stdio.h> #include <string.h> #include <time.h> @@ -97,3 +97,28 @@ void post_newboard(char* bgroup, char* bname, char* bms){ post_msg("Record", title, genbuf, "[系統]"); } +void give_money_post(char *userid, int money) { + FILE *fp; + fileheader_t fhdr; + time_t now = time(0); + char genbuf[200], reason[30]; + int i, flag=0; + + strcpy(genbuf, "boards/S/Security"); + stampfile(genbuf, &fhdr); + if(!(fp = fopen(genbuf,"w"))) + return; + fprintf(fp, "作者: [系統安全局] 看板: Security\n" + "標題: [公安報告] 站長%s使用紅包機報告\n" + "時間: %s\n", cuser.userid, ctime(&now)); + clrtobot(); + clear(); + fprintf(fp, "\n 站長\033[1;32m%s\033[m給\033[1;33m%s %d 元\033[m", + cuser.userid, userid, money); + + fclose(fp); + sprintf(fhdr.title, "[公安報告] 站長%s使用紅包機報告", + cuser.userid); + strcpy(fhdr.owner, "[系統安全局]"); + append_record("boards/S/Security/.DIR", &fhdr, sizeof(fhdr)); +} |