equal
deleted
inserted
replaced
98 roomClients = IntSet.elems $ playersIDs room |
98 roomClients = IntSet.elems $ playersIDs room |
99 room = rooms ! 0 |
99 room = rooms ! 0 |
100 |
100 |
101 |
101 |
102 processAction (clID, serverInfo, clients, rooms) (AnswerSameClan msg) = do |
102 processAction (clID, serverInfo, clients, rooms) (AnswerSameClan msg) = do |
103 mapM_ (\cl -> writeChan (sendChan cl) msg) sameClanClients |
103 mapM_ (\cl -> writeChan (sendChan cl) msg) sameClanOrSpec |
104 return (clID, serverInfo, clients, rooms) |
104 return (clID, serverInfo, clients, rooms) |
105 where |
105 where |
106 otherRoomClients = Prelude.map ((!) clients) $ IntSet.elems $ clID `IntSet.delete` (playersIDs room) |
106 otherRoomClients = Prelude.map ((!) clients) $ IntSet.elems $ clID `IntSet.delete` (playersIDs room) |
|
107 sameClanOrSpec = if teamsInGame client > 0 then sameClanClients else spectators |
|
108 spectators = Prelude.filter (\cl -> teamsInGame cl == 0) otherRoomClients |
107 sameClanClients = Prelude.filter (\cl -> teamsInGame cl > 0 && clientClan cl == thisClan) otherRoomClients |
109 sameClanClients = Prelude.filter (\cl -> teamsInGame cl > 0 && clientClan cl == thisClan) otherRoomClients |
108 thisClan = clientClan client |
110 thisClan = clientClan client |
109 room = rooms ! rID |
111 room = rooms ! rID |
110 rID = roomID client |
112 rID = roomID client |
111 client = clients ! clID |
113 client = clients ! clID |