linux: remove ask to accept duplicate invitations

This commit is contained in:
Eric House 2023-11-17 09:00:43 -08:00
parent e2f9c1c699
commit 47004a0e08
3 changed files with 14 additions and 11 deletions

View file

@ -250,9 +250,9 @@ game_makeRematch( const XWGame* oldGame, XWEnv xwe, XW_UtilCtxt* newUtil,
selfAddrP = &selfAddr; selfAddrP = &selfAddr;
} }
if ( game_makeNewGame( MPPARM(newUtil->mpool) xwe, newGame, newUtil->gameInfo, if ( game_makeNewGame( MPPARM(newUtil->mpool) xwe, newGame,
selfAddrP, (CommsAddrRec*)NULL, newUtil, newUtil->gameInfo, selfAddrP, (CommsAddrRec*)NULL,
(DrawCtx*)NULL, newCp, procs ) ) { newUtil, (DrawCtx*)NULL, newCp, procs ) ) {
const CurGameInfo* newGI = newUtil->gameInfo; const CurGameInfo* newGI = newUtil->gameInfo;
for ( int ii = 0; ii < ra.nAddrs; ++ii ) { for ( int ii = 0; ii < ra.nAddrs; ++ii ) {
@ -1043,7 +1043,8 @@ player_timePenalty( CurGameInfo* gi, XP_U16 playerNum )
void void
game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line ) game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line )
{ {
XP_LOGFF( "msg: %s from %s() line %d; addr: %p", msg, func, line, gi ); XP_LOGFF( "msg: %s from %s() line %d; gameID: %X", msg, func, line,
!!gi ? gi->gameID:0 );
if ( !!gi ) { if ( !!gi ) {
XP_LOGF( " nPlayers: %d", gi->nPlayers ); XP_LOGF( " nPlayers: %d", gi->nPlayers );
for ( XP_U16 ii = 0; ii < gi->nPlayers; ++ii ) { for ( XP_U16 ii = 0; ii < gi->nPlayers; ++ii ) {
@ -1053,7 +1054,6 @@ game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line )
} }
XP_LOGF( " forceChannel: %d", gi->forceChannel ); XP_LOGF( " forceChannel: %d", gi->forceChannel );
XP_LOGF( " serverRole: %d", gi->serverRole ); XP_LOGF( " serverRole: %d", gi->serverRole );
XP_LOGF( " gameID: %d", gi->gameID );
XP_LOGF( " dictName: %s", gi->dictName ); XP_LOGF( " dictName: %s", gi->dictName );
XP_LOGF( " isoCode: %s", gi->isoCodeStr ); XP_LOGF( " isoCode: %s", gi->isoCodeStr );
} }

View file

@ -1193,9 +1193,10 @@ inviteReceivedCurses( void* closure, const NetLaunchInfo* invite )
gdb_getRowsForGameID( aGlobals->cag.params->pDb, invite->gameID, rowids, &nRowIDs ); gdb_getRowsForGameID( aGlobals->cag.params->pDb, invite->gameID, rowids, &nRowIDs );
bool doIt = 0 == nRowIDs; bool doIt = 0 == nRowIDs;
if ( ! doIt && !!aGlobals->mainWin ) { if ( ! doIt && !!aGlobals->mainWin ) {
const gchar* question = "Duplicate invitation received. Accept anyway?"; XP_LOGFF( "duplicate invite; not creating game" );
const char* buttons[] = { "Yes", "No" }; /* const gchar* question = "Duplicate invitation received. Accept anyway?"; */
doIt = 0 == cursesask( aGlobals->mainWin, question, VSIZE(buttons), buttons ); /* const char* buttons[] = { "Yes", "No" }; */
/* doIt = 0 == cursesask( aGlobals->mainWin, question, VSIZE(buttons), buttons ); */
} }
if ( doIt ) { if ( doIt ) {
cb_dims dims; cb_dims dims;

View file

@ -756,9 +756,11 @@ inviteReceivedGTK( void* closure, const NetLaunchInfo* invite )
bool doIt = 0 == nRowIDs; bool doIt = 0 == nRowIDs;
if ( ! doIt ) { if ( ! doIt ) {
doIt = GTK_RESPONSE_YES == gtkask( apg->window, doIt = XP_FALSE;
"Duplicate invitation received. Accept anyway?", XP_LOGFF( "duplicate invite; not creating game" );
GTK_BUTTONS_YES_NO, NULL ); /* doIt = GTK_RESPONSE_YES == gtkask( apg->window, */
/* "Duplicate invitation received. Accept anyway?", */
/* GTK_BUTTONS_YES_NO, NULL ); */
} }
if ( doIt ) { if ( doIt ) {
gameFromInvite( apg, invite ); gameFromInvite( apg, invite );