summaryrefslogtreecommitdiffstats
path: root/mbbsd/user.c
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/user.c
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/user.c')
-rw-r--r--mbbsd/user.c35
1 files changed, 35 insertions, 0 deletions
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);