Small optimization in net server
authorunc0rr
Thu, 26 Feb 2009 15:00:48 +0000
changeset 1846 24d0074d4eed
parent 1845 1d4a5280887d
child 1847 2178c0fc838c
Small optimization in net server
QTfrontend/hwform.cpp
gameServer/Actions.hs
--- a/QTfrontend/hwform.cpp	Thu Feb 26 14:58:06 2009 +0000
+++ b/QTfrontend/hwform.cpp	Thu Feb 26 15:00:48 2009 +0000
@@ -650,7 +650,6 @@
 				QMessageBox::tr("Connection to server is lost"));
 	
 	}
-qDebug() << "ForcedDisconnect" << ui.Pages->currentIndex();
 	if (ui.Pages->currentIndex() != ID_PAGE_NET) GoBack();
 }
 
--- a/gameServer/Actions.hs	Thu Feb 26 14:58:06 2009 +0000
+++ b/gameServer/Actions.hs	Thu Feb 26 15:00:48 2009 +0000
@@ -119,7 +119,7 @@
 			else
 				[]
 		answerOthersQuit =
-			if not $ Prelude.null clientNick then
+			if logonPassed client then
 				if not $ Prelude.null msg then
 					[AnswerAll ["LOBBY:LEFT", clientNick, msg]]
 				else
@@ -274,7 +274,7 @@
 		: answerLobbyNicks
 		-- ++ (answerServerMessage client clients)
 	where
-		lobbyNicks = Prelude.filter (\n -> (not (Prelude.null n))) $ Prelude.map nick $ elems clients
+		lobbyNicks = Prelude.map nick $ Prelude.filter logonPassed $ elems clients
 		answerLobbyNicks = if not $ Prelude.null lobbyNicks then
 					[AnswerThisClient (["LOBBY:JOINED"] ++ lobbyNicks)]
 				else