[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp, 1.170.2.1, 1.170.2.2

[email protected] Fri, 08 Oct 2004 11:36:41 +0200
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv2158/client

Modified Files:
      Tag: KDE_3_3_BRANCH
	atlantik.cpp 
Log Message:
New-patches: [email protected]/atlantik--mainline--0.8--patch-44
Summary: bugfix: auto-join game after handshake instead of connection
Keywords: 

Fixes accepting invitations that have a game specified.


Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.170.2.1
retrieving revision 1.170.2.2
diff -u -d -r1.170.2.1 -r1.170.2.2
--- atlantik.cpp	6 Sep 2004 19:11:33 -0000	1.170.2.1
+++ atlantik.cpp	8 Oct 2004 09:36:39 -0000	1.170.2.2
@@ -433,12 +433,6 @@
 
 void Atlantik::slotNetworkConnected()
 {
-	// Check command-line args to see if we need to auto-join
-	KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-
-	QCString game = args->getOption("game");	
-	if (!game.isNull())
-		m_atlantikNetwork->joinGame(game.toInt());
 }
 
 void Atlantik::slotNetworkError(int errnum)
@@ -774,6 +768,13 @@
 void Atlantik::sendHandshake()
 {
 	m_atlantikNetwork->setName(m_config.playerName);
+
+	// Check command-line args to see if we need to auto-join
+	KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+	QCString game = args->getOption("game");	
+	if (!game.isNull())
+		m_atlantikNetwork->joinGame(game.toInt());
 }
 
 void Atlantik::statusBarClick(int item)