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