There was the old AW method to deal with this sort of thing, called Persona Non Grata status. In AW, if you were to shoot down two friendlies within a 24 hour period, the third time you shot down a friendly you would have your guns and ordnance disabled for 24 and an additional 24 hours for each team kill after #3. Once in PNG status, all you could do is either up a fighter/bomber with no guns or bombs or up a C47 and fly supply missions.
ack-ack