Talhak, jester to Sultan Mahmud of Ghazna (r. 998-1030), enjoyed a close and easy relationship with him. See also the lexicon entry for ‘dalhak’, apparently deriving from Talhak’s name, and another example of his cuckold jokes. Like jesters in Europe and China he could use his sense of humour to cajole the sultan into a better temper:
‘One day Sultan Mahmud was very angry, and Talhak wanted to change his mood. He asked, “O Sultan, what was your father’s name?” The Sultan was annoyed and turned away from him. Talhak walked around him and once more asked the question. The Sultan said, “Cuckold! what do you want my father’s name for?” Talhak retorted, “Now we know what your father’s name was. What about your grandfather’s name?” Thus the Sultan was made to laugh.’
Source: ‘Obeyd-e Zakani (c. 1300-71), The Ethics of the Aristocrats and Other Satirical Works, trans. by Hasan Javadi, Middle Eastern Series, 11 (California: Jahan Books, 1985), p. 83.