Prescribed Punishments (Kitab Al-Hudud)
Dawud :: Book 38 : Hadith 4457
Narrated Some Companions:
AbuUmamah ibn Sahl ibn Hunayf said that some companions of the Apostle of Allah (peace_be_upon_him) told that one of their men suffered so much from some illness that he pined away until he was skin and bone (i.e. only a skeleton). A slave-girl of someone visited him, and he was cheered by her and had unlawful intercourse with her. When his people came to visit the patient, he told them about it.
He said: Ask the Apostle of Allah (peace_be_upon_him) about the legal verdict for me, for I have had unlawful intercourse with a slave-girl who visited me.
So they mentioned it to the Apostle of Allah (peace_be_upon_him) saying: We have never seen anyone (so weak) from illness as he is. If we bring him to you, his bones will disintegrate. He is only skin and bone. So the Apostle of Allah (peace_be_upon_him) commanded them to take one hundred twigs and strike him once.