equal
deleted
inserted
replaced
46 return $ JoinLobby : [AnswerClients [sendChan cl] ["ADMIN_ACCESS"] | isAdministrator cl] |
46 return $ JoinLobby : [AnswerClients [sendChan cl] ["ADMIN_ACCESS"] | isAdministrator cl] |
47 else |
47 else |
48 return [ByeClient "Authentication failed"] |
48 return [ByeClient "Authentication failed"] |
49 |
49 |
50 |
50 |
|
51 handleCmd_NotEntered ["CHECKER", protoNum, newNick, password] = do |
|
52 (ci, irnc) <- ask |
|
53 let cl = irnc `client` ci |
|
54 |
|
55 if parsedProto == 0 then return [ProtocolError "Bad number"] |
|
56 else |
|
57 return $ [ |
|
58 ModifyClient (\c -> c{clientProto = parsedProto, nick = newNick, webPassword = password, isChecker = True}) |
|
59 , CheckRegistered] |
|
60 where |
|
61 parsedProto = readInt_ protoNum |
|
62 |
|
63 |
51 handleCmd_NotEntered _ = return [ProtocolError "Incorrect command (state: not entered)"] |
64 handleCmd_NotEntered _ = return [ProtocolError "Incorrect command (state: not entered)"] |