equal
deleted
inserted
replaced
11 |
11 |
12 handleCmd_NotEntered :: CmdHandler |
12 handleCmd_NotEntered :: CmdHandler |
13 |
13 |
14 handleCmd_NotEntered clID clients _ ["NICK", newNick] |
14 handleCmd_NotEntered clID clients _ ["NICK", newNick] |
15 | not . null $ nick client = [ProtocolError "Nickname already chosen"] |
15 | not . null $ nick client = [ProtocolError "Nickname already chosen"] |
16 | haveSameNick = [AnswerThisClient ["WARNING", "Nickname collision"], ByeClient ""] |
16 | haveSameNick = [AnswerThisClient ["WARNING", "Nickname already in use"], ByeClient ""] |
17 | illegalName newNick = [ByeClient "Illegal nickname"] |
17 | illegalName newNick = [ByeClient "Illegal nickname"] |
18 | otherwise = |
18 | otherwise = |
19 ModifyClient (\c -> c{nick = newNick}) : |
19 ModifyClient (\c -> c{nick = newNick}) : |
20 AnswerThisClient ["NICK", newNick] : |
20 AnswerThisClient ["NICK", newNick] : |
21 [CheckRegistered | clientProto client /= 0] |
21 [CheckRegistered | clientProto client /= 0] |