gameServer/HWProtoLobbyState.hs
changeset 13515 9ba5e4594322
parent 13514 da59012fbd7a
child 13702 dc06ef77a73a
equal deleted inserted replaced
13514:da59012fbd7a 13515:9ba5e4594322
    27 import CoreTypes
    27 import CoreTypes
    28 import Utils
    28 import Utils
    29 import HandlerUtils
    29 import HandlerUtils
    30 import RoomsAndClients
    30 import RoomsAndClients
    31 import EngineInteraction
    31 import EngineInteraction
       
    32 import CommandHelp
    32 
    33 
    33 
    34 
    34 handleCmd_lobby :: CmdHandler
    35 handleCmd_lobby :: CmdHandler
    35 
    36 
    36 
    37 
   166     c <- liftM sendChan thisClient
   167     c <- liftM sendChan thisClient
   167     return [Random [c] rs]
   168     return [Random [c] rs]
   168 
   169 
   169 handleCmd_lobby ["HELP"] = do
   170 handleCmd_lobby ["HELP"] = do
   170     cl <- thisClient
   171     cl <- thisClient
   171     return [
   172     if isAdministrator cl then
   172         AnswerClients [sendChan cl] ["CHAT", "[server]", loc "List of chat commands for lobby:" ],
   173         return (cmdHelpActionList [sendChan cl] cmdHelpLobbyAdmin)
   173         AnswerClients [sendChan cl] ["CHAT", "[server]", loc " /info <player>: Show info about player"],
   174     else
   174         AnswerClients [sendChan cl] ["CHAT", "[server]", loc " /me <message>: Chat action, e.g. '/me eats piza' becomes '* Player eats pizza'"],
   175         return (cmdHelpActionList [sendChan cl] cmdHelpLobbyPlayer)
   175         AnswerClients [sendChan cl] ["CHAT", "[server]", loc " /rnd: Flip a virtual coin and write 'heads' or 'tails' in chat"],
       
   176         AnswerClients [sendChan cl] ["CHAT", "[server]", loc " /rnd [A] [B] [C] [...]: Randomly select a word and write it in chat"],
       
   177         AnswerClients [sendChan cl] ["CHAT", "[server]", loc " /help: Show command help"] ]
       
   178 
   176 
   179     ---------------------------
   177     ---------------------------
   180     -- Administrator's stuff --
   178     -- Administrator's stuff --
   181 
   179 
   182 handleCmd_lobby ["KICK", kickNick] = serverAdminOnly $ do
   180 handleCmd_lobby ["KICK", kickNick] = serverAdminOnly $ do