equal
deleted
inserted
replaced
125 (Just ci) <- gets clientIndex |
125 (Just ci) <- gets clientIndex |
126 ri <- clientRoomA |
126 ri <- clientRoomA |
127 |
127 |
128 chan <- client's sendChan |
128 chan <- client's sendChan |
129 clNick <- client's nick |
129 clNick <- client's nick |
|
130 loggedIn <- client's logonPassed |
130 |
131 |
131 when (ri /= lobbyId) $ do |
132 when (ri /= lobbyId) $ do |
132 processAction $ MoveToLobby ("quit: " `B.append` msg) |
133 processAction $ MoveToLobby ("quit: " `B.append` msg) |
133 return () |
134 return () |
134 |
135 |
135 clientsChans <- liftM (Prelude.map sendChan . Prelude.filter logonPassed) $! allClientsS |
136 clientsChans <- liftM (Prelude.map sendChan . Prelude.filter logonPassed) $! allClientsS |
136 io $ |
137 io $ |
137 infoM "Clients" (show ci ++ " quits: " ++ B.unpack msg) |
138 infoM "Clients" (show ci ++ " quits: " ++ B.unpack msg) |
138 |
139 |
139 processAction $ AnswerClients [chan] ["BYE", msg] |
140 processAction $ AnswerClients [chan] ["BYE", msg] |
140 processAction $ AnswerClients clientsChans ["LOBBY:LEFT", clNick, msg] |
141 when loggedIn $ processAction $ AnswerClients clientsChans ["LOBBY:LEFT", clNick, msg] |
141 |
142 |
142 s <- get |
143 s <- get |
143 put $! s{removedClients = ci `Set.insert` removedClients s} |
144 put $! s{removedClients = ci `Set.insert` removedClients s} |
144 |
145 |
145 processAction (DeleteClient ci) = do |
146 processAction (DeleteClient ci) = do |