Connecting sprinklers to pipe