gameServer/HWProtoCore.hs
branchsdl2transition
changeset 9798 f2b18754742f
parent 9787 0da6ba2f1f93
child 10039 58cf89284115
equal deleted inserted replaced
9711:7d0329f37181 9798:f2b18754742f
    49             cl <- thisClient
    49             cl <- thisClient
    50             rnc <- liftM snd ask
    50             rnc <- liftM snd ask
    51             let chans = map (sendChan . client rnc) $ allClients rnc
    51             let chans = map (sendChan . client rnc) $ allClients rnc
    52             return [AnswerClients chans ["CHAT", "[global notice]", p] | isAdministrator cl]
    52             return [AnswerClients chans ["CHAT", "[global notice]", p] | isAdministrator cl]
    53         h "WATCH" f = return [QueryReplay f]
    53         h "WATCH" f = return [QueryReplay f]
       
    54         h "FIX" _ = handleCmd ["FIX"]
       
    55         h "UNFIX" _ = handleCmd ["UNFIX"]
       
    56         h "GREETING" msg = handleCmd ["GREETING", msg]
    54         h c p = return [Warning $ B.concat ["Unknown cmd: /", c, p]]
    57         h c p = return [Warning $ B.concat ["Unknown cmd: /", c, p]]
    55 
    58 
    56 handleCmd cmd = do
    59 handleCmd cmd = do
    57     (ci, irnc) <- ask
    60     (ci, irnc) <- ask
    58     let cl = irnc `client` ci
    61     let cl = irnc `client` ci