gameServer/HWProtoInRoomState.hs
changeset 8247 d7cf4a9ce685
parent 8232 fb5aa767a2a0
child 8330 aaefa587e277
child 8369 31033e521653
equal deleted inserted replaced
8245:d1a830c304c7 8247:d7cf4a9ce685
   299     let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId
   299     let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId
   300     return
   300     return
   301         [KickRoomClient kickId | master && isJust maybeClientId && (kickId /= thisClientId) && sameRoom]
   301         [KickRoomClient kickId | master && isJust maybeClientId && (kickId /= thisClientId) && sameRoom]
   302 
   302 
   303 
   303 
       
   304 handleCmd_inRoom ["DELEGATE", newAdmin] = do
       
   305     (thisClientId, rnc) <- ask
       
   306     maybeClientId <- clientByNick newAdmin
       
   307     master <- liftM isMaster thisClient
       
   308     let newAdminId = fromJust maybeClientId
       
   309     let sameRoom = clientRoom rnc thisClientId == clientRoom rnc newAdminId
       
   310     return
       
   311         [ChangeMaster (Just newAdminId) | master && isJust maybeClientId && (newAdminId /= thisClientId) && sameRoom]
       
   312 
       
   313 
   304 handleCmd_inRoom ["TEAMCHAT", msg] = do
   314 handleCmd_inRoom ["TEAMCHAT", msg] = do
   305     cl <- thisClient
   315     cl <- thisClient
   306     chans <- roomSameClanChans
   316     chans <- roomSameClanChans
   307     return [AnswerClients chans ["EM", engineMsg cl]]
   317     return [AnswerClients chans ["EM", engineMsg cl]]
   308     where
   318     where