gameServer/HWProtoCore.hs
changeset 10881 941b5ab9e5a6
parent 10460 8dcea9087d75
child 10882 ed7717f659ae
equal deleted inserted replaced
10880:bf64f1bef1cc 10881:941b5ab9e5a6
    74         h "GREETING" msg = handleCmd ["GREETING", msg]
    74         h "GREETING" msg = handleCmd ["GREETING", msg]
    75         h "CALLVOTE" msg | B.null msg = handleCmd ["CALLVOTE"]
    75         h "CALLVOTE" msg | B.null msg = handleCmd ["CALLVOTE"]
    76                          | otherwise = let (c, p) = extractParameters msg in
    76                          | otherwise = let (c, p) = extractParameters msg in
    77                                            if B.null p then handleCmd ["CALLVOTE", c] else handleCmd ["CALLVOTE", c, p]
    77                                            if B.null p then handleCmd ["CALLVOTE", c] else handleCmd ["CALLVOTE", c, p]
    78         h "VOTE" msg = handleCmd ["VOTE", upperCase msg]
    78         h "VOTE" msg = handleCmd ["VOTE", upperCase msg]
       
    79         h "FORCE" msg = handleCmd ["VOTE", upperCase msg, "FORCE"]
    79         h c p = return [Warning $ B.concat ["Unknown cmd: /", c, " ", p]]
    80         h c p = return [Warning $ B.concat ["Unknown cmd: /", c, " ", p]]
    80 
    81 
    81         extractParameters p = let (a, b) = B.break (== ' ') p in (upperCase a, B.dropWhile (== ' ') b)
    82         extractParameters p = let (a, b) = B.break (== ' ') p in (upperCase a, B.dropWhile (== ' ') b)
    82 
    83 
    83 
    84