equal
deleted
inserted
replaced
33 |
33 |
34 handleCmd_NotEntered ["PROTO", protoNum] = do |
34 handleCmd_NotEntered ["PROTO", protoNum] = do |
35 (ci, irnc) <- ask |
35 (ci, irnc) <- ask |
36 let cl = irnc `client` ci |
36 let cl = irnc `client` ci |
37 if clientProto cl > 0 then return [ProtocolError "Protocol already known"] |
37 if clientProto cl > 0 then return [ProtocolError "Protocol already known"] |
38 else |
38 else |
39 if parsedProto == 0 then return [ProtocolError "Bad number"] |
39 if parsedProto == 0 then return [ProtocolError "Bad number"] |
40 else |
40 else |
41 return $ |
41 return $ |
42 ModifyClient (\c -> c{clientProto = parsedProto}) : |
42 ModifyClient (\c -> c{clientProto = parsedProto}) : |
43 AnswerClients [sendChan cl] ["PROTO", B.pack $ show parsedProto] : |
43 AnswerClients [sendChan cl] ["PROTO", B.pack $ show parsedProto] : |
44 [CheckRegistered | not . B.null $ nick cl] |
44 [CheckRegistered | not . B.null $ nick cl] |
45 where |
45 where |