equal
deleted
inserted
replaced
18 handleCmd_NotEntered ["NICK", newNick] = do |
18 handleCmd_NotEntered ["NICK", newNick] = do |
19 (ci, irnc) <- ask |
19 (ci, irnc) <- ask |
20 let cl = irnc `client` ci |
20 let cl = irnc `client` ci |
21 if not . B.null $ nick cl then return [ProtocolError "Nickname already chosen"] |
21 if not . B.null $ nick cl then return [ProtocolError "Nickname already chosen"] |
22 else |
22 else |
23 if haveSameNick irnc then return [AnswerClients [sendChan cl] ["WARNING", "Nickname already in use"], ByeClient ""] |
23 if haveSameNick irnc then return [{-AnswerClients [sendChan cl] ["WARNING", "Nickname already in use"], -}ByeClient "Nickname already in use"] |
24 else |
24 else |
25 if illegalName newNick then return [ByeClient "Illegal nickname"] |
25 if illegalName newNick then return [ByeClient "Illegal nickname"] |
26 else |
26 else |
27 return $ |
27 return $ |
28 ModifyClient (\c -> c{nick = newNick}) : |
28 ModifyClient (\c -> c{nick = newNick}) : |