deleteClient :: Client -> Clients -> Clients
deleteClient client clients = clients
    { byUid  = byUid'
    , byNick = byNick'
    }
  where byUid' = IM.delete (uid client) (byUid clients)
        byNick' = case nick client of
            Nothing    -> byNick clients
            Just nick' -> M.delete (map toUpper nick') (byNick clients)
deleteClient :: Client -> Clients -> Clients
deleteClient client clients = clients
    { byUid  = byUid'
    , byNick = byNick'
    }
  where byUid' = IM.delete (uid client) (byUid clients)
        byNick' = case nick client of
            Nothing    -> byNick clients
            Just nick' -> M.delete (map toUpper nick') (byNick clients)
deleteClient client clients = clients
    { byUid  = byUid'
    , byNick = byNick'
    }
  where byUid' = IM.delete (uid client) (byUid clients)
        byNick' = case nick client of
            Nothing    -> byNick clients
            Just nick' -> M.delete (map toUpper nick') (byNick clients)