gameServer/HWProtoNEState.hs
changeset 1847 2178c0fc838c
parent 1844 81abed9d4c11
child 1879 bb114339eb4e
equal deleted inserted replaced
1846:24d0074d4eed 1847:2178c0fc838c
    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", passwd] =
    44 handleCmd_NotEntered clID clients _ ["PASSWORD", passwd] =
    45 	if passwd == webPassword client then
    45 	if passwd == webPassword client then
    46 		[ModifyClient (\cl -> cl{logonPassed = True}),
    46 		[ModifyClient (\cl -> cl{logonPassed = True}),
    47 		MoveToLobby]
    47 		MoveToLobby] ++ adminNotice
    48 	else
    48 	else
    49 		[ByeClient "Authentication failed"]
    49 		[ByeClient "Authentication failed"]
    50 	where
    50 	where
    51 		client = clients IntMap.! clID
    51 		client = clients IntMap.! clID
       
    52 		adminNotice = if isAdministrator client then [AnswerThisClient ["ADMIN_ACCESS"]] else []
    52 
    53 
    53 
    54 
    54 handleCmd_NotEntered _ _ _ ["DUMP"] =
    55 handleCmd_NotEntered _ _ _ ["DUMP"] =
    55 	[Dump]
    56 	[Dump]
    56 
    57