I heard the Messenger of Allah (May peace be upon him) as saying; if anyone hears a man crying out in the mosque about something he has lost, he should say: May Allah not restore it to you, for the mosque were not built for this. (Using translation from Abū Dāʾūd 473)
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ مَنْ سَمِعَ رَجُلًا يَنْشُدُ فِي الْمَسْجِدِ ضَالَّةً فَلْيَقُلْ لَا أَدَّاهَا اللهُ إلَيْكَفَإِنَّ الْمَسَاجِدَ لَمْ تُبْنَ لِذَلِكَ