summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-08 00:28:16 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-08 00:28:16 +0800
commit9e0b2ea45c1e12487b0e1adacff2374e1abc3698 (patch)
tree610f8433af6e38cf83a4abfb7c20216ec7ff4ad7 /util
parent0a53143ab2af803cfc00358a551c06bb4f95fae2 (diff)
downloadpttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.tar
pttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.tar.gz
pttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.tar.bz2
pttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.tar.lz
pttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.tar.xz
pttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.tar.zst
pttbbs-9e0b2ea45c1e12487b0e1adacff2374e1abc3698.zip
* remove BM_money.c.
ptt don't use these code 3 years. and we don't want to maintain these code. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4520 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/BM_money.c99
-rw-r--r--util/BM_money.sh5
-rw-r--r--util/Makefile4
3 files changed, 2 insertions, 106 deletions
diff --git a/util/BM_money.c b/util/BM_money.c
deleted file mode 100644
index b089fb0b..00000000
--- a/util/BM_money.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* $Id$ */
-
-/* 給板主錢的程式 */
-
-#define _UTIL_C_
-#include "bbs.h"
-
-#define FUNCTION (2100 - c*5)
-
-extern int numboards;
-extern boardheader_t *bcache;
-extern struct UCACHE *uidshm;
-
-int c, n;
-
-
-
-int main(int argc, char **argv)
-{
- FILE *fp = fopen(BBSHOME "/etc/topboardman", "r");
- char buf[201], bname[20], BM[90], *ch;
- boardheader_t *bptr = NULL;
- int nBM;
-
- attach_SHM();
- resolve_boards();
- if(passwd_init())
- exit(1);
- if (!fp)
- return 0;
-
- c = 0;
- fgets(buf, 200, fp); /* 第一行拿掉 */
-
- printf(
- " \033[1;44m 獎勵優良板主 每週花薪 依精華區排名分配 \033[m\n\n"
- "\033[33m (排名太後面或幾乎沒有精華區者不列入)\033[m\n"
- " ─────────────────────────────────────\n"
- "\n\n");
-
- while (fgets(buf, 200, fp) != NULL)
- {
- buf[24] = 0;
- sscanf(&buf[9], "%s", bname);
- for (n = 0; n < numboards; n++)
- {
- bptr = &bcache[n];
- if (!strcmp(bptr->brdname, bname))
- break;
- }
- if (n == numboards)
- continue;
- strcpy(BM, bptr->BM);
- printf(" (%d) %-15.15s %s \n", c + 1, bptr->brdname, bptr->title);
-
- if (BM[0] == 0 || BM[0] == ' ')
- continue;
-
- ch = BM;
- for (nBM = 1; (ch = strchr(ch, '/')) != NULL; nBM++)
- {
- ch++;
- };
- ch = BM;
-
- if (FUNCTION <= 0)
- break;
-
- printf(" 獎金 \033[32m%6d \033[m 分給 \033[33m%s\033[m \n",
- FUNCTION, bptr->BM);
-
- for (n = 0; n < nBM; n++)
- {
- fileheader_t mymail;
- char *ch1,uid ;
- if((ch1 = strchr(ch, '/')))
- *ch1 = 0;
- if ((uid=searchuser(ch, ch))!=0)
- {
-
- char genbuf[200];
- deumoney(uid,FUNCTION / nBM);
- sprintf(genbuf, BBSHOME "/home/%c/%s", ch[0], ch);
- stampfile(genbuf, &mymail);
-
- strcpy(mymail.owner, "[薪水袋]");
- sprintf(mymail.title,
- "\033[32m %s \033[m板的薪水 $\033[33m%d\033![m", bptr->brdname, FUNCTION / nBM);
- unlink(genbuf);
- Link(BBSHOME "/etc/BM_money", genbuf);
- sprintf(genbuf, BBSHOME "/home/%c/%s/.DIR", ch[0], ch);
- append_record(genbuf, &mymail, sizeof(mymail));
- }
- ch = ch1 + 1;
- }
- c++;
- }
- return 0;
-}
diff --git a/util/BM_money.sh b/util/BM_money.sh
deleted file mode 100644
index 8bef4fc9..00000000
--- a/util/BM_money.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# $Id: BM_money.sh,v 1.1 2002/03/07 15:13:45 in2 Exp $
-
-bin/BM_money > etc/BM_money
-bin/post Record 星期五' '版主發薪日 [財金消息] etc/BM_money
diff --git a/util/Makefile b/util/Makefile
index c74ba2e1..0af19f73 100644
--- a/util/Makefile
+++ b/util/Makefile
@@ -15,7 +15,7 @@ MBBSD_OBJS= \
# 下面這些程式, 會被 compile 並且和 $(UTIL_OBJS) 聯結
CPROG_WITH_UTIL= \
- boardlist BM_money post poststat \
+ boardlist post poststat \
account birth deluserfile \
expire mandex horoscope broadcast \
openvice openticket topusr \
@@ -38,7 +38,7 @@ CPROG_WITHOUT_UTIL= \
# 下面這些程式會被 install
PROGS= ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL}\
shmctl \
- BM_money.sh backpasswd.sh mailog.sh opendice.sh \
+ backpasswd.sh mailog.sh opendice.sh \
openticket.sh stock.sh topsong.sh weather.sh \
stock.perl weather.perl toplazyBM.sh \
dailybackup.pl tarqueue.pl waterball.pl filtermail.pl \