Joining Masonic sects–Canon law

Canon_Law1917 Canon Law 2335

Persons joining associations of the Masonic sect or any others of the same kind (which plot against the Church) and legitimate authorities contract ipso facto excommunication simply reserved to the Apostolic See.

The point here is taken that we have had many prelates who were Masons for the sole purpose of maintaning some civic goal which would benefit the community.