[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.121.6.13,1.121.6.14 atlantik.h,1.51.6.1,1.51.6.2

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv21624/client

Modified Files:
      Tag: KDE_3_1_BRANCH
	atlantik.cpp atlantik.h 
Log Message:
backport: store reconnection cookie

Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.121.6.13
retrieving revision 1.121.6.14
diff -u -d -r1.121.6.13 -r1.121.6.14
--- atlantik.cpp	17 Jun 2003 19:55:41 -0000	1.121.6.13
+++ atlantik.cpp	18 Jun 2003 00:58:49 -0000	1.121.6.14
@@ -549,6 +549,8 @@
 	connect(m_atlantikNetwork, SIGNAL(newTrade(Trade *)), this, SLOT(newTrade(Trade *)));
 	connect(m_atlantikNetwork, SIGNAL(newAuction(Auction *)), this, SLOT(newAuction(Auction *)));
 
+	connect(m_atlantikNetwork, SIGNAL(clientCookie(QString)), this, SLOT(clientCookie(QString)));
+
 	connect(this, SIGNAL(rollDice()), m_atlantikNetwork, SLOT(rollDice()));
 	connect(this, SIGNAL(buyEstate()), m_atlantikNetwork, SLOT(buyEstate()));
 	connect(this, SIGNAL(auctionEstate()), m_atlantikNetwork, SLOT(auctionEstate()));
@@ -556,6 +558,17 @@
 	connect(this, SIGNAL(jailCard()), m_atlantikNetwork, SLOT(jailCard()));
 	connect(this, SIGNAL(jailPay()), m_atlantikNetwork, SLOT(jailPay()));
 	connect(this, SIGNAL(jailRoll()), m_atlantikNetwork, SLOT(jailRoll()));
+}
+
+void Atlantik::clientCookie(QString cookie)
+{
+	KConfig *config = kapp->config();
+
+	config->setGroup("Reconnection");
+	config->writeEntry("Host", m_atlantikNetwork->host());
+	config->writeEntry("Port", m_atlantikNetwork->port());
+	config->writeEntry("Cookie", cookie);
+	config->sync();
 }
 
 void Atlantik::addPortfolioView(Player *player)

Index: atlantik.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.h,v
retrieving revision 1.51.6.1
retrieving revision 1.51.6.2
diff -u -d -r1.51.6.1 -r1.51.6.2
--- atlantik.h	20 Jan 2003 23:47:36 -0000	1.51.6.1
+++ atlantik.h	18 Jun 2003 00:58:49 -0000	1.51.6.2
@@ -97,6 +97,7 @@
 	void initBoard();
 	void showBoard();
 	void freezeBoard();
+	void clientCookie(QString cookie);
 
 public slots:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.