From 1d88f1ec941997fad204a51371b0ef4552d62ea8 Mon Sep 17 00:00:00 2001 From: scw Date: Wed, 17 Aug 2005 15:24:57 +0000 Subject: chess photo not found problem git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3055 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chess.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mbbsd/chess.c b/mbbsd/chess.c index 4b717af1..bac430e0 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -1069,6 +1069,7 @@ ChessInitUser(ChessInfo* info) info->actions->init_user(uinfo, &info->user2); } +#ifdef CHESSCOUNTRY static char* ChessPhotoInitial(ChessInfo* info) { @@ -1163,7 +1164,7 @@ ChessPhotoInitial(ChessInfo* info) info->constants->turn_str[info->myturn ^ 1]); getuser(info->user2.userid, &xuser); - sethomefile(genbuf, info->user2.userid, "photo_cchess"); + sethomefile(genbuf, info->user2.userid, info->constants->photo_file_name); fp = fopen(genbuf, "r"); if (fp == NULL) { @@ -1215,6 +1216,7 @@ ChessPhotoInitial(ChessInfo* info) return photo; } +#endif /* defined(CHESSCOUNTRY) */ static void ChessInitPlayFunc(ChessInfo* info) @@ -1267,7 +1269,9 @@ NewChessInfo(const ChessActions* actions, const ChessConstants* constants, ChessInitUser(info); +#ifdef CHESSCOUNTRY info->photo = ChessPhotoInitial(info); +#endif if (mode != CHESS_MODE_WATCH) ChessHistoryInit(&info->history, constants->step_entry_size); -- cgit v1.2.3