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