From 9bba55fc1bd4fe8899faeb128fe58eff2165aa70 Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 3 Jun 2009 16:28:32 +0000 Subject: - 18x boards should not provide URLs git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4490 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 6dc798c0..2f0686e3 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -3492,15 +3492,35 @@ view_postinfo(int ent, const fileheader_t * fhdr, const char *direct, int crs_ln } #ifdef QUERY_ARTICLE_URL - if(currboard && currboard[0]) { - prints("│ " URL_DISPLAYNAME ": " - ANSI_COLOR(1) URL_PREFIX "/%s/%s.html" ANSI_RESET "\n", - currboard, fhdr->filename); - } - else - { - prints("│\n"); + boardheader_t *bp = NULL; + + // XXX currbid should match currboard, right? can we use it? + if (currboard && currboard[0]) + { + int bnum = getbnum(currboard); + if (bnum > 0) + { + assert(0<=bnum-1 && bnum-1brdattr & BRD_OVER18) + { + // over18 boards do not provide URL. + prints("│ 本看板不提供" URL_DISPLAYNAME " \n"); + } + else + { + prints("│ " URL_DISPLAYNAME ": " + ANSI_COLOR(1) URL_PREFIX "/%s/%s.html" ANSI_RESET "\n", + currboard, fhdr->filename); + } } #endif -- cgit v1.2.3