[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.147,1.148

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

Modified Files:
	atlantik.cpp 
Log Message:
better cookie handling

Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- atlantik.cpp	18 Jun 2003 00:58:39 -0000	1.147
+++ atlantik.cpp	22 Jun 2003 00:12:18 -0000	1.148
@@ -598,10 +598,21 @@
 {
 	KConfig *config = kapp->config();
 
-	config->setGroup("Reconnection");
-	config->writeEntry("Host", m_atlantikNetwork->host());
-	config->writeEntry("Port", m_atlantikNetwork->port());
-	config->writeEntry("Cookie", cookie);
+	if (cookie.isNull())
+	{
+		if (config->hasGroup("Reconnection"))
+			config->deleteGroup("Reconnection", true);
+	}
+	else if (m_atlantikNetwork)
+	{
+		config->setGroup("Reconnection");
+		config->writeEntry("Host", m_atlantikNetwork->host());
+		config->writeEntry("Port", m_atlantikNetwork->port());
+		config->writeEntry("Cookie", cookie);
+	}
+	else
+		return;
+
 	config->sync();
 }
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.