equal
deleted
inserted
replaced
3 module RoomsAndClients, |
3 module RoomsAndClients, |
4 clientRoomA, |
4 clientRoomA, |
5 ServerState(..), |
5 ServerState(..), |
6 client's, |
6 client's, |
7 allClientsS, |
7 allClientsS, |
|
8 allRoomsS, |
8 roomClientsS, |
9 roomClientsS, |
9 sameProtoClientsS, |
10 sameProtoClientsS, |
10 io |
11 io |
11 ) where |
12 ) where |
12 |
13 |
38 io $ client'sM rnc f ci |
39 io $ client'sM rnc f ci |
39 |
40 |
40 allClientsS :: StateT ServerState IO [ClientInfo] |
41 allClientsS :: StateT ServerState IO [ClientInfo] |
41 allClientsS = gets roomsClients >>= liftIO . clientsM |
42 allClientsS = gets roomsClients >>= liftIO . clientsM |
42 |
43 |
|
44 allRoomsS :: StateT ServerState IO [RoomInfo] |
|
45 allRoomsS = gets roomsClients >>= liftIO . roomsM |
|
46 |
43 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo] |
47 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo] |
44 roomClientsS ri = do |
48 roomClientsS ri = do |
45 rnc <- gets roomsClients |
49 rnc <- gets roomsClients |
46 io $ roomClientsM rnc ri |
50 io $ roomClientsM rnc ri |
47 |
51 |