gameServer/HWProtoNEState.hs
changeset 1844 81abed9d4c11
parent 1841 fba7210b438b
child 1847 2178c0fc838c
equal deleted inserted replaced
1843:16cdd1745b73 1844:81abed9d4c11
    39 	where
    39 	where
    40 		client = clients IntMap.! clID
    40 		client = clients IntMap.! clID
    41 		parsedProto = fromMaybe 0 (maybeRead protoNum :: Maybe Word16)
    41 		parsedProto = fromMaybe 0 (maybeRead protoNum :: Maybe Word16)
    42 		checkPassword = if (not . null) (nick client) then [CheckRegistered] else []
    42 		checkPassword = if (not . null) (nick client) then [CheckRegistered] else []
    43 
    43 
    44 handleCmd_NotEntered clID clients _ ["PASSWORD"] =
    44 handleCmd_NotEntered clID clients _ ["PASSWORD", passwd] =
    45 	[ModifyClient (\cl -> cl{logonPassed = True}),
    45 	if passwd == webPassword client then
    46 	MoveToLobby]
    46 		[ModifyClient (\cl -> cl{logonPassed = True}),
       
    47 		MoveToLobby]
       
    48 	else
       
    49 		[ByeClient "Authentication failed"]
       
    50 	where
       
    51 		client = clients IntMap.! clID
    47 
    52 
    48 
    53 
    49 handleCmd_NotEntered _ _ _ ["DUMP"] =
    54 handleCmd_NotEntered _ _ _ ["DUMP"] =
    50 	[Dump]
    55 	[Dump]
    51 
    56