I'm having a hard time visualizing this. Anyhow, in general....
The white wire from the ceiling goes to each of the sockets, and the white wire from the fan motor.
The black wire from the ceiling goes to the switch. Sounds like there are two outputs from the switch. One goes to the fan, other to the four light sockets.
Christopher A. Young Learn more about Jesus
formatting link
.
The second wire-nut connects the other brown wire from each of the 4 light-bulb sockets.
The third wire-nut connects the other black wire from the pull-chain switch to the white wire coming down from the body of the ceiling fan.
The light kit is wired directly to the house current (not to a wall switch).
The lights are controlled by the pull-chain switch. The lights should come on regardless of whether the fan is on or off.