A court in Brazil also bars the ex-president from using social media and put him under 24-hour surveillance.