gameServer/HWProtoCore.hs
changeset 3458 11cd56019f00
parent 3435 4e4f88a7bdf2
child 3500 af8390d807d6
equal deleted inserted replaced
3457:2c29b75746f3 3458:11cd56019f00
    23 handleCmd ("QUIT" : xs) = return [ByeClient msg]
    23 handleCmd ("QUIT" : xs) = return [ByeClient msg]
    24     where
    24     where
    25         msg = if not $ null xs then head xs else ""
    25         msg = if not $ null xs then head xs else ""
    26 
    26 
    27 {-
    27 {-
    28 handleCmd clID clients _ ["PONG"] =
    28 handleCmd ["PONG"] =
    29     if pingsQueue client == 0 then
    29     if pingsQueue client == 0 then
    30         [ProtocolError "Protocol violation"]
    30         [ProtocolError "Protocol violation"]
    31     else
    31     else
    32         [ModifyClient (\cl -> cl{pingsQueue = pingsQueue cl - 1})]
    32         [ModifyClient (\cl -> cl{pingsQueue = pingsQueue cl - 1})]
    33     where
    33     where
    35 -}
    35 -}
    36 
    36 
    37 handleCmd cmd = do
    37 handleCmd cmd = do
    38     (ci, irnc) <- ask
    38     (ci, irnc) <- ask
    39     if logonPassed (irnc `client` ci) then
    39     if logonPassed (irnc `client` ci) then
       
    40         handleCmd_loggedin cmd
       
    41         else
    40         handleCmd_NotEntered cmd
    42         handleCmd_NotEntered cmd
    41         else
       
    42         handleCmd_loggedin cmd
       
    43 
    43 
    44 {-
    44 {-
    45 handleCmd_loggedin clID clients rooms ["INFO", asknick] =
    45 handleCmd_loggedin clID clients rooms ["INFO", asknick] =
    46     if noSuchClient then
    46     if noSuchClient then
    47         []
    47         []