gameServer/HWProtoCore.hs
changeset 9036 1ae1b6017b27
parent 9034 279168729cc3
child 9035 e84d42a4311c
equal deleted inserted replaced
9026:f6074540bab2 9036:1ae1b6017b27
    41             else
    41             else
    42             return []
    42             return []
    43     where
    43     where
    44         h ["DELEGATE", n] = handleCmd ["DELEGATE", n]
    44         h ["DELEGATE", n] = handleCmd ["DELEGATE", n]
    45         h ["STATS"] = handleCmd ["STATS"]
    45         h ["STATS"] = handleCmd ["STATS"]
    46         h ["PART", msg] = handleCmd ["PART", msg]
    46         h ("PART":m:ms) = handleCmd ["PART", B.unwords $ m:ms]
    47         h ["QUIT", msg] = handleCmd ["QUIT", msg]
    47         h ("QUIT":m:ms) = handleCmd ["QUIT", B.unwords $ m:ms]
    48         h ["GLOBAL", msg] = do
    48         h ("GLOBAL":m:ms) = do
    49             rnc <- liftM snd ask
    49             rnc <- liftM snd ask
    50             let chans = map (sendChan . client rnc) $ allClients rnc
    50             let chans = map (sendChan . client rnc) $ allClients rnc
    51             return [AnswerClients chans ["CHAT", "[global notice]", msg]]
    51             return [AnswerClients chans ["CHAT", "[global notice]", B.unwords $ m:ms]]
    52         h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c]
    52         h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c]
    53 
    53 
    54 handleCmd cmd = do
    54 handleCmd cmd = do
    55     (ci, irnc) <- ask
    55     (ci, irnc) <- ask
    56     let cl = irnc `client` ci
    56     let cl = irnc `client` ci