gameServer/HWProtoInRoomState.hs
changeset 13700 feda0d1da62c
parent 13697 7f174e7285e5
child 13703 2df519242d41
equal deleted inserted replaced
13699:e6523fe53d11 13700:feda0d1da62c
   454             else
   454             else
   455             return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "/callvote kick: No such user!"]]
   455             return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "/callvote kick: No such user!"]]
   456 
   456 
   457 
   457 
   458 handleCmd_inRoom ["CALLVOTE", "MAP"] = do
   458 handleCmd_inRoom ["CALLVOTE", "MAP"] = do
       
   459     -- Display list of available maps for voting
   459     cl <- thisClient
   460     cl <- thisClient
   460     s <- liftM (Map.keys . roomSaves) thisRoom
   461     s <- liftM (Map.keys . roomSaves) thisRoom
   461     return [AnswerClients [sendChan cl] ["CHAT", nickServer, B.concat ["callvote map: ", B.intercalate ", " s]]]
   462     return [AnswerClients [sendChan cl]
       
   463         ["CHAT", nickServer,
       
   464             if (not $ null s) then
       
   465                 (B.concat ["/callvote map: ", B.intercalate ", " s])
       
   466             else
       
   467                 loc "/callvote map: No maps available."
       
   468         ]]
   462 
   469 
   463 
   470 
   464 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do
   471 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do
   465     cl <- thisClient
   472     cl <- thisClient
   466     rm <- thisRoom
   473     rm <- thisRoom