Yeah. Simpley do not let any Spies, Diplomats, Units, generals etc. from the city. A good thing to use would be if a enemy spy was in the settlement he would catch plague, return to his master and a new epidemic starts. That makes it easy to take over cities... but they're plagued cities so this strategy doesn't really work.