diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-05-26 13:25:03 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-05-26 13:25:03 +0800 |
commit | 38918e67f0aabf6c9fd7ee743faa4dc296384691 (patch) | |
tree | 5ce1dd700f8d8327ecf2e65c3ba041fce7a075f4 /mbbsd | |
parent | 648817f7b2957819f2854e7ee223ea9f7ed32619 (diff) | |
download | pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.tar pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.tar.gz pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.tar.bz2 pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.tar.lz pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.tar.xz pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.tar.zst pttbbs-38918e67f0aabf6c9fd7ee743faa4dc296384691.zip |
blog support
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@903 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/announce.c | 77 | ||||
-rw-r--r-- | mbbsd/var.c | 13 |
2 files changed, 88 insertions, 2 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 8bd39115..dd89ff1b 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -1,4 +1,4 @@ -/* $Id: announce.c,v 1.22 2003/05/24 03:45:14 in2 Exp $ */ +/* $Id: announce.c,v 1.23 2003/05/26 05:23:13 in2 Exp $ */ #include "bbs.h" static void @@ -1542,6 +1542,30 @@ a_menu(char *maintitle, char *path, int lastlevel) refresh(); sleep(1); break; + +#ifdef BLOG + case 'b': + if( !HAS_PERM(SYSOP) && !is_BM(bcache[currbid - 1].BM) ) + vmsg("�u���O�D�~�i�H�έ�!"); + else{ + char genbuf[128]; + snprintf(genbuf, sizeof(genbuf), + "bin/builddb.pl -f -n %d %s", me.now, currboard); + system(genbuf); + vmsg("��Ƨ�s����"); + } + me.page = 9999; + break; + + case 'B': + if( !HAS_PERM(SYSOP) && !is_BM(bcache[currbid - 1].BM) ) + vmsg("�u���O�D�~�i�H�έ�!"); + else + BlogMain(me.now); + me.page = 9999; + + break; +#endif } if (me.level >= MANAGER) { @@ -1641,3 +1665,54 @@ Announce() NOBODY)); return 0; } + +#ifdef BLOG +void BlogMain(int num) +{ + int oldmode = currutmp->mode; + char genbuf[128], exit = 0; + + //setutmpmode(BLOGGING); /* will crash someone using old program */ + sprintf(genbuf, "%s��������", currboard); + showtitle("������", genbuf); + while( !exit ){ + move(1, 0); + prints("�п�ܱz�n���檺���@:\n" + "0.�^��W�@�h\n" + "1.�s�@������˪O�榡\n" + " �ϥηs�� config �ؿ��U�˪O���\n" + " �q�`�b�Ĥ@���ϥΥ�����μ˪O��s���ɭԨϥ�\n" + "\n" + "2.���s�s�@������\n" + " �u�b�������ƾ�Ӷñ����ɭԤ~�ϥ�\n" + "\n" + "3.�N����[�J������\n" + " �N��ЩҦb��m���峹�[�J������\n"); + switch( getans("�п��(0-3)�H[0]") ){ + case '1': + snprintf(genbuf, sizeof(genbuf), + "bin/builddb.pl -c %s", currboard); + system(genbuf); + break; + case '2': + snprintf(genbuf, sizeof(genbuf), + "bin/builddb.pl -a %s", currboard); + vmsg(genbuf); + system(genbuf); + break; + case '3': + snprintf(genbuf, sizeof(genbuf), + "bin/builddb.pl -f -n %d %s", num, currboard); + system(genbuf); + break; + default: + exit = 1; + break; + } + if( !exit ) + vmsg("�����槹��"); + } + currutmp->mode = oldmode; + pressanykey(); +} +#endif diff --git a/mbbsd/var.c b/mbbsd/var.c index 8d43e7d5..d8356d02 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -1,4 +1,4 @@ -/* $Id: var.c,v 1.16 2003/04/06 04:11:10 victor Exp $ */ +/* $Id: var.c,v 1.17 2003/05/26 05:23:13 in2 Exp $ */ #define INCLUDE_VAR_H #include "bbs.h" @@ -262,6 +262,17 @@ char *ModeTypeTable[MAX_MODES] = { "NBA�j�q��" /* TMPJACK */ "��tt�d�]�t��", /* JCEE */ "���s�峹" /* REEDIT */ + "������", /* BLOGGING */ + "", /* for future usage */ + "", + "", + "", + "", + "", + "", + "", + "", + "", }; /* indict.c */ |