Al-Adab Al-Mufrad, Book 54, Hadith 1268 (English) ⓘ
Al-Fadil ibn Muslim reported that his father said, "When 'Ali, may Allah be pleased with him, went out through the Bab al-Qasr, he saw some backgammon players. He took them and locked them up from morning to night. Some of them he only locked up for half the day. Those he locked up until night were those who used silver. Those he locked up for half the day were those who played it. He also commanded that they should not be greeted."
حَدَّثَنَا عُبَيْدُ اللهِ بْنُ سَعِيدٍ، عَنِ الْقَاسِمِ بْنِ الْحَكَمِ الْقَاضِي، قَالَ: أَخْبَرَنَا عُبَيْدُ اللهِ بْنُ الْوَلِيدِ الْوَصَّافِيُّ، عَنِ الْفُضَيْلِ بْنِ مُسْلِمٍ، عَنْ أَبِيهِ قَالَ: كَانَ عَلِيٌّ رَضِيَ اللَّهُ عَنْهُ إِذَا خَرَجَ مِنْ بَابِ الْقَصْرِ، فَرَأَى أَصْحَابَ النَّرْدِ انْطَلَقَ بِهِمْ فَعَقَلَهُمْ مِنْ غُدْوَةٍ إِلَى اللَّيْلِ، فَمِنْهُمْ مَنْ يُعْقَلُ إِلَى نِصْفِ النَّهَارِ. قَالَ: وَكَانَ الَّذِي يُعْقَلُ إِلَى اللَّيْلِ هُمُ الَّذِينَ يُعَامِلُونَ بِالْوَرِقِ، وَكَانَ الَّذِي يُعْقَلُ إِلَى نِصْفِ النَّهَارِ الَّذِينَ يَلْهُونَ بِهَا، وَكَانَ يَأْمُرُ أَنْ لا يُسَلِّمُوا عَلَيْهِمْ.
also referenced under: Hadith 1268 (Reference) & Book 54, Hadith 10 (In-Book)