equal
deleted
inserted
replaced
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 |