452 processAction $ CheckBanned False |
452 processAction $ CheckBanned False |
453 liftM B.null $ client's nick |
453 liftM B.null $ client's nick |
454 checkerLogin _ False _ = processAction $ ByeClient $ loc "No checker rights" |
454 checkerLogin _ False _ = processAction $ ByeClient $ loc "No checker rights" |
455 checkerLogin p True _ = do |
455 checkerLogin p True _ = do |
456 wp <- client's webPassword |
456 wp <- client's webPassword |
457 processAction $ |
457 chan <- client's sendChan |
458 if wp == p then ModifyClient $ \c -> c{logonPassed = True} else ByeClient $ loc "Authentication failed" |
458 mapM_ processAction $ |
|
459 if wp == p then |
|
460 [ModifyClient $ \c -> c{logonPassed = True} |
|
461 , AnswerClients [chan] ["LOGONPASSED"] |
|
462 ] |
|
463 else |
|
464 [ByeClient $ loc "Authentication failed"] |
459 playerLogin p a contr = do |
465 playerLogin p a contr = do |
460 chan <- client's sendChan |
466 chan <- client's sendChan |
461 mapM_ processAction [ |
467 mapM_ processAction [ |
462 AnswerClients [chan] ["ASKPASSWORD"] |
468 AnswerClients [chan] ["ASKPASSWORD"] |
463 , ModifyClient (\c -> c{webPassword = p, isAdministrator = a, isContributor = contr}) |
469 , ModifyClient (\c -> c{webPassword = p, isAdministrator = a, isContributor = contr}) |