I haven't looked at the code, but the message popping up for unrelated civs is probably caused by an addMessage call having either the first param as your players ID and/or the second param as
true rather than
false.
The addMessage call in the SDK is (or the way I use it is...)
PHP:
gDLL->getInterfaceIFace()->addMessage(<player>, <show to all players>, more params...)
In Python is is likely to be
PHP:
CyInterface().addMessage(<player>, <show to all players>, more params...)
So if you search for those and check the first 2 params you may find what is causing this. The first param should be the ID of the civ doing the capturing and the second param false.
Of course I may be shot down by those more experienced in modding, but that it how I have seen it done in the past and how it works in my mods