From c41b9da86a50368ac405667465b38187fcfc5c88 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Fri, 20 Nov 2009 23:33:08 +0000 Subject: [PATCH] More informative version string error messages. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8418 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/netplay/netplay.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/netplay/netplay.c b/lib/netplay/netplay.c index b775c7764..0658b280d 100644 --- a/lib/netplay/netplay.c +++ b/lib/netplay/netplay.c @@ -1111,11 +1111,12 @@ static void recvVersionCheck() sasprintf((char**)&msg, _("Player %u has the wrong game version. Auto kicking."), victim); sendTextMessage(msg, true); - + sasprintf((char**)&msg, "you have the wrong version; update it! (You have [%s], we expect [%s].)", playersVersion, VersionString); + if (NetPlay.isHost) { - kickPlayer( victim, "you have the wrong version of the game, so Update it!", ERROR_WRONGVERSION ); - + kickPlayer( victim, msg, ERROR_WRONGVERSION ); + // reset flags /time after we kick them NetPlay.players[victim].versionCheckTime = -1; NetPlay.players[victim].playerVersionFlag = false; @@ -1148,7 +1149,7 @@ static void VersionCheckTimeOut(uint32_t victim) if(NetPlay.isHost) { - kickPlayer( victim, "You have the wrong version of the game, so Update it!", ERROR_WRONGVERSION ); + kickPlayer( victim, "you have the wrong version; update it! (Version string never received.)", ERROR_WRONGVERSION ); // reset flags /time after we kick them NetPlay.players[victim].versionCheckTime = -1;