I seem to remember that some DM's use a DC roll to have a character remember importaint facts involved in a game.
Next time he says something stupid, have him make a diplomacy check. Don't make the DC to high, maybe a 10 or a 12. And if he makes it, say "That little inner voice that you have in your head says that would be a bad thing to say. They just might kick you butt if you say that."
After a while, he just might get the point.
Edit: oops, should have read all the posts. everyone else has figured it out.