gameServer/HWProtoNEState.hs
changeset 1844 81abed9d4c11
parent 1841 fba7210b438b
child 1847 2178c0fc838c
--- a/gameServer/HWProtoNEState.hs	Wed Feb 25 17:36:02 2009 +0000
+++ b/gameServer/HWProtoNEState.hs	Thu Feb 26 06:39:20 2009 +0000
@@ -41,9 +41,14 @@
 		parsedProto = fromMaybe 0 (maybeRead protoNum :: Maybe Word16)
 		checkPassword = if (not . null) (nick client) then [CheckRegistered] else []
 
-handleCmd_NotEntered clID clients _ ["PASSWORD"] =
-	[ModifyClient (\cl -> cl{logonPassed = True}),
-	MoveToLobby]
+handleCmd_NotEntered clID clients _ ["PASSWORD", passwd] =
+	if passwd == webPassword client then
+		[ModifyClient (\cl -> cl{logonPassed = True}),
+		MoveToLobby]
+	else
+		[ByeClient "Authentication failed"]
+	where
+		client = clients IntMap.! clID
 
 
 handleCmd_NotEntered _ _ _ ["DUMP"] =