Attending the masjid and having a bad smell

Often, in some masaajid there is a bad smell – such as [that of] garlic, onions, [tobacco] smoke – [something indicative of some of the congregation] paying [little or] no attention to the cleanliness of their clothes, nor respecting the sanctity of the prayer and the masaajid, not to mention the other members of the congregation; so what is your advice to these people?