X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=14cdf0cc50b72ae7b04b67adf98f1e61c0e3de39;hb=377bf9818b41e22a35bf96ede1252cd7088e8a66;hp=ca3e342c89807ee7a89750aeef68c9ff008f2ac3;hpb=0c082fce711802c67feae5dd1ddadad022a48147;p=xboard.git diff --git a/backend.c b/backend.c index ca3e342..14cdf0c 100644 --- a/backend.c +++ b/backend.c @@ -3863,6 +3863,7 @@ read_from_ics(isr, closure, data, count, error) strncmp(why, "Continuing ", 11) == 0) { gs_gamenum = gamenum; safeStrCpy(gs_kind, strchr(why, ' ') + 1,sizeof(gs_kind)/sizeof(gs_kind[0])); + if(ics_gamenum == -1) // [HGM] only if we are not already involved in a game (because gin=1 sends us such messages) VariantSwitch(boards[currentMove], StringToVariant(gs_kind)); // [HGM] variantswitch: even before we get first board #if ZIPPY if (appData.zippyPlay) { @@ -4951,6 +4952,11 @@ SendMoveToICS(moveType, fromX, fromY, toX, toY, promoChar) char promoChar; { char user_move[MSG_SIZ]; + char suffix[4]; + + if(gameInfo.variant == VariantSChess && promoChar) + snprintf(suffix, 4, "=%c", toX == BOARD_WIDTH<<1 ? ToUpper(promoChar) : ToLower(promoChar)); + else suffix[0] = NULLCHAR; switch (moveType) { default: @@ -4966,7 +4972,7 @@ SendMoveToICS(moveType, fromX, fromY, toX, toY, promoChar) case WhiteHSideCastleFR: case BlackHSideCastleFR: /* POP Fabien */ - snprintf(user_move, MSG_SIZ, "o-o\n"); + snprintf(user_move, MSG_SIZ, "o-o%s\n", suffix); break; case WhiteQueenSideCastle: case BlackQueenSideCastle: @@ -4976,7 +4982,7 @@ SendMoveToICS(moveType, fromX, fromY, toX, toY, promoChar) case WhiteASideCastleFR: case BlackASideCastleFR: /* POP Fabien */ - snprintf(user_move, MSG_SIZ, "o-o-o\n"); + snprintf(user_move, MSG_SIZ, "o-o-o%s\n",suffix); break; case WhiteNonPromotion: case BlackNonPromotion: