gameServer/HWProtoNEState.hs
changeset 4975 31da8979e5b1
parent 4942 1c85a8e6e11c
child 4989 4771fed9272e
equal deleted inserted replaced
4974:078cd026a7b1 4975:31da8979e5b1
     9 import CoreTypes
     9 import CoreTypes
    10 import Actions
    10 import Actions
    11 import Utils
    11 import Utils
    12 import RoomsAndClients
    12 import RoomsAndClients
    13 
    13 
    14 handleCmd_NotEntered :: CmdHandler
    14 handleCmd_NotEntered :: CmdHandler c
    15 
    15 
    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"]