# HG changeset patch
# User unc0rr
# Date 1224711660 0
# Node ID c164f215f7d233afb330996a9070875dae1d9f30
# Parent  2087672a211469debcd5220916a60314df311b95
 - Fix a bug screwing rooms list
 - Also show teams number in rooms list

diff -r 2087672a2114 -r c164f215f7d2 netserver/HWProto.hs
--- a/netserver/HWProto.hs	Wed Oct 22 21:34:03 2008 +0000
+++ b/netserver/HWProto.hs	Wed Oct 22 21:41:00 2008 +0000
@@ -109,7 +109,11 @@
 handleCmd_noRoom client _ rooms ["LIST"] =
 		(noChangeClients, noChangeRooms, answerServerMessage ++ (answerRoomsList $ concatMap roomInfo $ sameProtoRooms))
 		where
-			roomInfo room = [name room, show $ playersIn room, show $ gameinprogress room]
+			roomInfo room = [
+					name room,
+					(show $ playersIn room) ++ "(" ++ (show $ length $ teams room) ++ ")",
+					show $ gameinprogress room
+					]
 			sameProtoRooms = filter (\r -> roomProto r == protocol client) rooms
 
 handleCmd_noRoom client _ rooms ["CREATE", newRoom, roomPassword] =
diff -r 2087672a2114 -r c164f215f7d2 netserver/Miscutils.hs
--- a/netserver/Miscutils.hs	Wed Oct 22 21:34:03 2008 +0000
+++ b/netserver/Miscutils.hs	Wed Oct 22 21:41:00 2008 +0000
@@ -115,7 +115,7 @@
 	if name room == name rm then
 		room : rms
 	else
-		room : modifyRoom room rms
+		rm : modifyRoom room rms
 
 modifyTeam :: RoomInfo -> TeamInfo -> RoomInfo
 modifyTeam room team = room{teams = replaceTeam team $ teams room}