equal
deleted
inserted
replaced
32 handleCmd_NotEntered :: CmdHandler |
32 handleCmd_NotEntered :: CmdHandler |
33 |
33 |
34 handleCmd_NotEntered ["NICK", newNick] = do |
34 handleCmd_NotEntered ["NICK", newNick] = do |
35 (ci, irnc) <- ask |
35 (ci, irnc) <- ask |
36 let cl = irnc `client` ci |
36 let cl = irnc `client` ci |
37 if not . B.null $ nick cl then return [ProtocolError $ loc "Nickname already taken."] |
37 if not . B.null $ nick cl then return [ProtocolError $ loc "Nickname already provided."] |
38 else |
38 else |
39 if illegalName newNick then return [ByeClient $ loc "Illegal nickname! Nicknames must be between 1-40 characters long, must not have a trailing or leading space and must not have any of these characters: $()*+?[]^{|}"] |
39 if illegalName newNick then return [ByeClient $ loc "Illegal nickname! Nicknames must be between 1-40 characters long, must not have a trailing or leading space and must not have any of these characters: $()*+?[]^{|}"] |
40 else |
40 else |
41 return $ |
41 return $ |
42 ModifyClient (\c -> c{nick = newNick}) : |
42 ModifyClient (\c -> c{nick = newNick}) : |