gameServer/HWProtoInRoomState.hs
changeset 10212 5fb3bb2de9d2
parent 10195 d1c23bb73346
child 10215 26fc5502ba22
equal deleted inserted replaced
10211:f4c51ab8f46d 10212:5fb3bb2de9d2
     7 import qualified Data.ByteString.Char8 as B
     7 import qualified Data.ByteString.Char8 as B
     8 import Control.Monad
     8 import Control.Monad
     9 import Control.Monad.Reader
     9 import Control.Monad.Reader
    10 --------------------------------------
    10 --------------------------------------
    11 import CoreTypes
    11 import CoreTypes
    12 import Actions
       
    13 import Utils
    12 import Utils
    14 import HandlerUtils
    13 import HandlerUtils
    15 import RoomsAndClients
    14 import RoomsAndClients
    16 import EngineInteraction
    15 import EngineInteraction
    17 import Votes
    16 import Votes
   396             startVote $ VoteKick nickname
   395             startVote $ VoteKick nickname
   397             else
   396             else
   398             return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote kick: no such user"]]
   397             return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote kick: no such user"]]
   399 
   398 
   400 
   399 
       
   400 handleCmd_inRoom ["CALLVOTE", "MAP"] = do
       
   401     cl <- thisClient
       
   402     s <- liftM (Map.keys . roomSaves) thisRoom
       
   403     return [AnswerClients [sendChan cl] ["CHAT", "[server]", B.concat ["callvote map: ", B.intercalate ", " s]]]
       
   404 
       
   405 
   401 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do
   406 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do
   402     cl <- thisClient
   407     cl <- thisClient
   403     rm <- thisRoom
   408     rm <- thisRoom
   404 
   409 
   405     if Map.member roomSave $ roomSaves rm then
   410     if Map.member roomSave $ roomSaves rm then