a taste of his own medicine

If someone has had a taste of his own medicine (or her own medicine or their own medicine), the term is referring to someone receiving the same consequence that they have been giving to other people. This may include any type of unpleasantness such as unkind words, being selfish, doing selfish and irresponsible things; just about anything can have to do with getting a taste of your own medicine.