summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
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