Abu Hurairah (RAA) narrated that The Messenger of Allah (ﷺ) said:
"If anyone spies on you (tries to look at you) without your permission, and you thereupon throw a stone at him and because of it he lost his eye, you are not to be bIamed." Agreed upon. In another version by Ahmad and an-Nasa'i and graded as Sahih by Ibn Hibban, "He has no right for Diyah or Qisas."
English reference: Book 9, Hadith 1239
Arabic reference: Book 9, Hadith 1211