Muammar Gaddafi's forces were holding off protesters near the Libyan leader's hometown and recaptured a key city, as the United Nations prepared to send a special envoy to Tripoli while its chief demanded an end to "indiscriminate" attacks against civilians in Libya and warned