summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-12 22:13:27 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-12 22:13:27 +0800
commit034d58797eec19da098234a8c2626987081d9d48 (patch)
treec1cb879d5911cf94768a92c9408cb42143034754 /mbbsd
parent535e458a1b28ecdf69dddcace060807e462980fd (diff)
downloadpttbbs-034d58797eec19da098234a8c2626987081d9d48.tar
pttbbs-034d58797eec19da098234a8c2626987081d9d48.tar.gz
pttbbs-034d58797eec19da098234a8c2626987081d9d48.tar.bz2
pttbbs-034d58797eec19da098234a8c2626987081d9d48.tar.lz
pttbbs-034d58797eec19da098234a8c2626987081d9d48.tar.xz
pttbbs-034d58797eec19da098234a8c2626987081d9d48.tar.zst
pttbbs-034d58797eec19da098234a8c2626987081d9d48.zip
Personal chess country data query done.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2194 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/talk.c8
-rw-r--r--mbbsd/user.c35
-rw-r--r--mbbsd/var.c10
3 files changed, 53 insertions, 0 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 209852de..40d44668 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -2343,6 +2343,14 @@ userlist(void)
case 'S': /* 顯示好友描述 */
show_mode = (show_mode+1) % MAX_SHOW_MODE;
+#ifdef CHESSCOUNTRY
+ if (show_mode == 2)
+ user_query_mode = 1;
+ else if (show_mode == 3)
+ user_query_mode = 2;
+ else
+ user_query_mode = 0;
+#endif /* defined(CHESSCOUNTRY) */
redrawall = redraw = 1;
break;
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 819595a8..e2813c77 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -749,6 +749,41 @@ showplans(char *uid)
{
char genbuf[200];
+#ifdef CHESSCOUNTRY
+ if (user_query_mode) {
+ char *photo_name[2] = { "photo_fivechess", "photo_cchess" };
+ int i = 0;
+ FILE *fp;
+
+ sethomefile(genbuf, uid, photo_name[user_query_mode - 1]);
+ if ((fp = fopen(genbuf, "r")) != NULL)
+ {
+ char photo[6][256];
+ int kingdom_bid = 0;
+
+ move(7, 0);
+ while (i < 12 && fgets(genbuf, 256, fp))
+ {
+ genbuf[strlen(genbuf) - 1] = 0;
+ if (i < 6) /* 讀照片檔 */
+ strcpy(photo[i], genbuf);
+ else if (i == 6)
+ kingdom_bid = atoi(genbuf);
+ else
+ prints("%s %s\n", photo[i - 7], genbuf);
+
+ i++;
+ }
+
+ /* 棋國國徽 */
+ setapath(genbuf, bcache[kingdom_bid - 1].brdname);
+ strlcat(genbuf, "/chess_ensign", sizeof(genbuf));
+ show_file(genbuf, 12, 10, ONLY_COLOR);
+ return;
+ }
+ }
+#endif /* defined(CHESSCOUNTRY) */
+
sethomefile(genbuf, uid, fn_plans);
if (!show_file(genbuf, 7, MAX_QUERYLINES, ONLY_COLOR))
prints("《個人名片》%s 目前沒有名片", uid);
diff --git a/mbbsd/var.c b/mbbsd/var.c
index f7062848..8bcd145c 100644
--- a/mbbsd/var.c
+++ b/mbbsd/var.c
@@ -396,6 +396,16 @@ int chc_lefttime;
int chc_my, chc_turn, chc_selected, chc_firststep;
char chc_warnmsg[64], *chc_mateid;
+/* user.c */
+#ifdef CHESSCOUNTRY
+int user_query_mode;
+/*
+ * user_query_mode = 0 simple data
+ * = 1 gomoku chess country data
+ * = 2 chc chess country data
+ */
+#endif /* defined(CHESSCOUNTRY) */
+
/* screen.c */
#define scr_lns t_lines
#define scr_cols ANSILINELEN