gameServer/HWProtoNEState.hs
changeset 13081 dce9f0b84a18
parent 13079 81c154fd4380
child 13673 1aa5e884326a
equal deleted inserted replaced
13080:23a498a2b5b8 13081:dce9f0b84a18
    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}) :