gameServer/HWProtoInRoomState.hs
changeset 1977 2284d7fefe4f
parent 1929 7e6cc8da1c58
child 2126 cb249fa8e3da
equal deleted inserted replaced
1976:be2db1272ed2 1977:2284d7fefe4f
    22 
    22 
    23 handleCmd_inRoom clID clients rooms ["PART"] =
    23 handleCmd_inRoom clID clients rooms ["PART"] =
    24 	if isMaster client then
    24 	if isMaster client then
    25 		[RemoveRoom]
    25 		[RemoveRoom]
    26 	else
    26 	else
    27 		removeClientTeams ++
       
    28 		[RoomRemoveThisClient]
    27 		[RoomRemoveThisClient]
    29 	where
    28 	where
    30 		client = clients IntMap.! clID
    29 		client = clients IntMap.! clID
    31 		room = rooms IntMap.! (roomID client)
       
    32 		clientTeams = filter (\t -> teamowner t == nick client) $ teams room
       
    33 		removeClientTeams = map (RemoveTeam . teamname) clientTeams
       
    34 
    30 
    35 
    31 
    36 handleCmd_inRoom clID clients rooms ("CFG" : paramName : paramStrs) =
    32 handleCmd_inRoom clID clients rooms ("CFG" : paramName : paramStrs) =
    37 	if isMaster client then
    33 	if isMaster client then
    38 		[ModifyRoom (\r -> r{params = Map.insert paramName paramStrs (params r)})
    34 		[ModifyRoom (\r -> r{params = Map.insert paramName paramStrs (params r)})