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 if not . null $ nick client then |
15 if not . null $ nick client then |
16 [ProtocolError "Nick already chosen"] |
16 [ProtocolError "Nickname already chosen"] |
17 else if haveSameNick then |
17 else if haveSameNick then |
18 [AnswerThisClient ["WARNING", "Nick collision"]] |
18 [AnswerThisClient ["WARNING", "Nickname collision"]] |
19 ++ [ByeClient ""] |
19 ++ [ByeClient ""] |
|
20 else if illegalName newNick then |
|
21 [ByeClient "Illegal nickname"] |
20 else |
22 else |
21 [ModifyClient (\c -> c{nick = newNick}), |
23 [ModifyClient (\c -> c{nick = newNick}), |
22 AnswerThisClient ["NICK", newNick]] |
24 AnswerThisClient ["NICK", newNick]] |
23 ++ checkPassword |
25 ++ checkPassword |
24 where |
26 where |