«فَإِنْ كُنْتَ ابْنَ هَمَّامٍ فَحُيِّيتَ بِإِكْرَامٍ وَحَيِيتَ بَيْنَ كِرَامٍ»
If you are Ibn Hammām, may you be greeted with honour and live among honourable people.
The reply recognises Ibn Hammām by name. Ikrām / kirām supply a warm verbal echo.
This exchange confirms the narrator’s intuition: the stranger is Abū Zayd al-Sarūjī, whose recurring talent for language accompanies his shifts of outward appearance and fortune.