Valmiki Ramayana Yuddha Kanda Sarga 21 Shloka 15
Original Shlokaआत्मप्रशंसिनंदृष्टंधृष्टंविपरिथावकम् । सर्वत्रोत्सृष्टदण्डंचलोकस्सत्कुरुतेनरम् ।।6.21.15।।
1 source checked for this shloka
लोकः the world, आत्मप्रशंसिनम् praising one's own self, दुष्टम् wicked ones, धृष्टम् impudent, विपरिथावकम् an unchaste one, सर्वत्र all over उत्सृष्टदण्डंचनरम् one who goes about with a rod of punishment, सत्कुरुते treat with respect.
"Indeed, the world treats one with respect, who praises himself, as an impudent one, an unchaste one and one who goes about with a rod of punishment (not the one who is virtuous)."