The Revised Code of Canon Law (Church Law) published during the reign of John Paul II in 1983 was rather ambiguous about Masonic membership (and the Commentary made it seem like if Masonic organizations did not plot against the Church, Catholics could join).
In 1983, shortly after the publication of new Code of Canon Law, the Congregation for the Doctrine of the Faith (CDF -- headed by then Cardinal Joesph Ratzinger,now Pope Benedict XVI) issued a document that stopped short of excommunication but did declare that Catholics who are Freemasons are in a state of "grave sin and my not receive communion."
Here is that document. In 1985, and article appeared in the Vatican newspaper, L'Osservatore Romano that further clarified the stance of the CDF, and hence the Catholic Church, against Freemasonry.
Here is that article In the article, there is a notable shift in teaching away from "plotting against the Church" to opposing Freemasonry on the grounds that it promotes religious relativism, naturalistic religion, etc.
That being said, the penalty for belonging to the Masonic Lodge for a Catholic is no different than for a Catholic who uses artificial birth control.
Plustax, I am not sure why your friend had to wait 6 months to get back into the Church. I've NEVER heard of that happening unless an annulment was involved and your friend had re-married before the annulment came through. I was raised Catholic, spent two years in a Benedictine monastery, and have studied Catholic theology extensively (I have a Master's degree in Philosophy from the Univ. of St. Thomas in Houston). I am currently an unaffiliated Mason, but am working on changing that (dimitted in 2004 for a variety of reasons, but being Catholic was not one of them).