gameServer/HWProtoNEState.hs
changeset 3435 4e4f88a7bdf2
parent 2868 ccb20ecd3503
child 3458 11cd56019f00
equal deleted inserted replaced
3434:6af73e7f2438 3435:4e4f88a7bdf2
     9 import Actions
     9 import Actions
    10 import Utils
    10 import Utils
    11 
    11 
    12 handleCmd_NotEntered :: CmdHandler
    12 handleCmd_NotEntered :: CmdHandler
    13 
    13 
       
    14 {-
    14 handleCmd_NotEntered clID clients _ ["NICK", newNick]
    15 handleCmd_NotEntered clID clients _ ["NICK", newNick]
    15     | not . null $ nick client = [ProtocolError "Nickname already chosen"]
    16     | not . null $ nick client = [ProtocolError "Nickname already chosen"]
    16     | haveSameNick = [AnswerThisClient ["WARNING", "Nickname already in use"], ByeClient ""]
    17     | haveSameNick = [AnswerThisClient ["WARNING", "Nickname already in use"], ByeClient ""]
    17     | illegalName newNick = [ByeClient "Illegal nickname"]
    18     | illegalName newNick = [ByeClient "Illegal nickname"]
    18     | otherwise =
    19     | otherwise =
    47         adminNotice = [AnswerThisClient ["ADMIN_ACCESS"] | isAdministrator client]
    48         adminNotice = [AnswerThisClient ["ADMIN_ACCESS"] | isAdministrator client]
    48 
    49 
    49 
    50 
    50 handleCmd_NotEntered clID clients _ ["DUMP"] =
    51 handleCmd_NotEntered clID clients _ ["DUMP"] =
    51     if isAdministrator (clients IntMap.! clID) then [Dump] else []
    52     if isAdministrator (clients IntMap.! clID) then [Dump] else []
       
    53 -}
    52 
    54 
    53 
    55 handleCmd_NotEntered _ = return [ProtocolError "Incorrect command (state: not entered)"]
    54 handleCmd_NotEntered clID _ _ _ = [ProtocolError "Incorrect command (state: not entered)"]