gameServer/HWProtoInRoomState.hs
changeset 13991 4ae01eabf611
parent 13970 f791c46b47a4
child 13992 863604736cf5
equal deleted inserted replaced
13990:b9b1d74b7fef 13991:4ae01eabf611
   453         ["CHAT", nickServer, loc "Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs"]
   453         ["CHAT", nickServer, loc "Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs"]
   454         ]
   454         ]
   455 
   455 
   456 handleCmd_inRoom ["CALLVOTE", "KICK"] = do
   456 handleCmd_inRoom ["CALLVOTE", "KICK"] = do
   457     cl <- thisClient
   457     cl <- thisClient
   458     return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "/callvote kick: You need to specify a nickname."]]
   458     rm <- thisRoom
       
   459     return
       
   460         [AnswerClients [sendChan cl] ["CHAT", nickServer,
       
   461         if isJust $ masterID rm then
       
   462             loc "/callvote kick: This is only allowed in rooms without a room master."
       
   463         else
       
   464             loc "/callvote kick: You need to specify a nickname."
       
   465         ]]
   459 
   466 
   460 handleCmd_inRoom ["CALLVOTE", "KICK", nickname] = do
   467 handleCmd_inRoom ["CALLVOTE", "KICK", nickname] = do
   461     (thisClientId, rnc) <- ask
   468     (thisClientId, rnc) <- ask
   462     cl <- thisClient
   469     cl <- thisClient
   463     rm <- thisRoom
   470     rm <- thisRoom